2 /* vim: set expandtab sw=4 ts=4 sts=4: */
4 * tests for PMA_ifSetOr()
6 * @package phpMyAdmin-test
12 require_once 'PHPUnit/Framework.php';
13 require_once './libraries/core.lib.php';
16 * @package phpMyAdmin-test
18 class PMA_ifSetOr_test
extends PHPUnit_Framework_TestCase
20 public function testVarSet()
24 $out = PMA_ifSetOr($in, $default);
25 $this->assertEquals($in, $out);
27 public function testVarSetWrongType()
31 $out = PMA_ifSetOr($in, $default, 'boolean');
32 $this->assertEquals($out, $default);
34 public function testVarNotSet()
38 $out = PMA_ifSetOr($in, $default);
39 $this->assertEquals($out, $default);
41 public function testVarNotSetNoDefault()
44 $out = PMA_ifSetOr($in);
45 $this->assertEquals($out, null);