2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * Tests for PMA_ifSetOr() from libraries/core.lib.php
6 * @package phpMyAdmin-test
12 require_once 'libraries/core.lib.php';
14 class PMA_ifSetOr_test
extends PHPUnit_Framework_TestCase
16 public function testVarSet()
20 $out = PMA_ifSetOr($in, $default);
21 $this->assertEquals($in, $out);
23 public function testVarSetWrongType()
27 $out = PMA_ifSetOr($in, $default, 'boolean');
28 $this->assertEquals($out, $default);
30 public function testVarNotSet()
34 $out = PMA_ifSetOr($in, $default);
35 $this->assertEquals($out, $default);
37 public function testVarNotSetNoDefault()
40 $out = PMA_ifSetOr($in);
41 $this->assertEquals($out, null);