Tests: Add tests for the __return*()
functions.
Props pbearne, mukesh27. Fixes #46043. git-svn-id: https://develop.svn.wordpress.org/trunk@44658 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
192224a46e
commit
19645a4790
34
tests/phpunit/tests/functions/underscoreReturn.php
Normal file
34
tests/phpunit/tests/functions/underscoreReturn.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* Tests for __return_** set of functions
|
||||
*
|
||||
* @since 5.1.0
|
||||
*
|
||||
* @group functions.php
|
||||
*/
|
||||
class Tests_Functions_Underscore_Return extends WP_UnitTestCase {
|
||||
|
||||
public function test__return_true() {
|
||||
$this->assertTrue( __return_true() );
|
||||
}
|
||||
|
||||
public function test__return_false() {
|
||||
$this->assertFalse( __return_false() );
|
||||
}
|
||||
|
||||
public function test__return_zero() {
|
||||
$this->assertSame( 0, __return_zero() );
|
||||
}
|
||||
|
||||
public function test__return_empty_array() {
|
||||
$this->assertSame( array(), __return_empty_array() );
|
||||
}
|
||||
|
||||
public function test__return_null() {
|
||||
$this->assertNull( __return_null() );
|
||||
}
|
||||
|
||||
public function test__return_empty_string() {
|
||||
$this->assertSame( '', __return_empty_string() );
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user