2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * tests for PMA_ifSetOr()
7 * @package phpMyAdmin-test
13 require_once 'PHPUnit/Framework.php';
14 require_once './libraries/core.lib.php';
17 * @package phpMyAdmin-test
19 class PMA_ifSetOr_test
extends PHPUnit_Framework_TestCase
21 public function testVarSet()
25 $out = PMA_ifSetOr($in, $default);
26 $this->assertEquals($in, $out);
28 public function testVarSetWrongType()
32 $out = PMA_ifSetOr($in, $default, 'boolean');
33 $this->assertEquals($out, $default);
35 public function testVarNotSet()
39 $out = PMA_ifSetOr($in, $default);
40 $this->assertEquals($out, $default);
42 public function testVarNotSetNoDefault()
45 $out = PMA_ifSetOr($in);
46 $this->assertEquals($out, null);