Converting number of Excel column names no longer limited
[phpmyadmin/arisferyanto.git] / test / PMA_ifSetOr_test.php
blob4e9dce185f04fa8487c016b1859756d0f0557a5b
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * tests for PMA_ifSetOr()
6 * @version $Id$
7 * @package phpMyAdmin-test
8 */
10 /**
13 require_once 'PHPUnit/Framework.php';
14 require_once './libraries/core.lib.php';
16 /**
17 * @package phpMyAdmin-test
19 class PMA_ifSetOr_test extends PHPUnit_Framework_TestCase
21 public function testVarSet()
23 $default = 'foo';
24 $in = 'bar';
25 $out = PMA_ifSetOr($in, $default);
26 $this->assertEquals($in, $out);
28 public function testVarSetWrongType()
30 $default = 'foo';
31 $in = 'bar';
32 $out = PMA_ifSetOr($in, $default, 'boolean');
33 $this->assertEquals($out, $default);
35 public function testVarNotSet()
37 $default = 'foo';
38 // $in is not set!
39 $out = PMA_ifSetOr($in, $default);
40 $this->assertEquals($out, $default);
42 public function testVarNotSetNoDefault()
44 // $in is not set!
45 $out = PMA_ifSetOr($in);
46 $this->assertEquals($out, null);