| | 1 | <?php |
| | 2 | /** |
| | 3 | * Tests for __return_** set of functions |
| | 4 | * |
| | 5 | * Here for competence |
| | 6 | * |
| | 7 | * @group functions.php |
| | 8 | * @ticket #46043 |
| | 9 | */ |
| | 10 | class TEST__Return extends WP_UnitTestCase { |
| | 11 | |
| | 12 | public function test__return_true(){ |
| | 13 | $this->assertTrue( (boolean)__return_true() ); |
| | 14 | } |
| | 15 | |
| | 16 | public function test__return_false(){ |
| | 17 | $this->assertFalse( (boolean)__return_false() ); |
| | 18 | } |
| | 19 | |
| | 20 | public function test__return_zero(){ |
| | 21 | $this->assertEquals( 0, __return_zero() ); |
| | 22 | } |
| | 23 | |
| | 24 | public function test__return_empty_array(){ |
| | 25 | $this->assertEquals( array(), __return_empty_array() ); |
| | 26 | } |
| | 27 | |
| | 28 | public function test__return_null(){ |
| | 29 | $this->assertNull( __return_null() ); |
| | 30 | } |
| | 31 | |
| | 32 | public function test__return_empty_string(){ |
| | 33 | $this->assertEquals( '', __return_empty_string() ); |
| | 34 | } |
| | 35 | } |