Changeset 48937 for trunk/tests/phpunit/tests/basic.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/basic.php
r47403 r48937 15 15 preg_match( '#Copyright 2011-(\d+) by the contributors#', $license, $matches ); 16 16 $this_year = gmdate( 'Y' ); 17 $this->assert Equals( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." );17 $this->assertSame( $this_year, trim( $matches[1] ), "license.txt's year needs to be updated to $this_year." ); 18 18 } 19 19 … … 26 26 $current_version = substr( $GLOBALS['wp_version'], 0, 3 ); 27 27 $latest_stable = sprintf( '%s.x', (float) $current_version - 0.1 ); 28 $this->assert Equals( $latest_stable, trim( $matches[0] ), "SECURITY.md's version needs to be updated to $latest_stable." );28 $this->assertSame( $latest_stable, trim( $matches[0] ), "SECURITY.md's version needs to be updated to $latest_stable." ); 29 29 } 30 30 … … 37 37 $version .= '.0'; 38 38 } 39 $this->assert Equals( $version, $package_json['version'], "package.json's version needs to be updated to $version." );39 $this->assertSame( $version, $package_json['version'], "package.json's version needs to be updated to $version." ); 40 40 return $package_json; 41 41 } … … 54 54 55 55 function test_strip_ws() { 56 $this->assert Equals( '', strip_ws( '' ) );57 $this->assert Equals( 'foo', strip_ws( 'foo' ) );58 $this->assert Equals( '', strip_ws( "\r\n\t \n\r\t" ) );56 $this->assertSame( '', strip_ws( '' ) ); 57 $this->assertSame( 'foo', strip_ws( 'foo' ) ); 58 $this->assertSame( '', strip_ws( "\r\n\t \n\r\t" ) ); 59 59 60 60 $in = "asdf\n"; … … 76 76 $expected .= 'foo'; 77 77 78 $this->assert Equals( $expected, strip_ws( $in ) );78 $this->assertSame( $expected, strip_ws( $in ) ); 79 79 80 80 } … … 94 94 <ol id="authors"><form action="?import=wordpress&step=2&id=" method="post"><input type="hidden" name="_wpnonce" value="***" /><input type="hidden" name="_wp_http_referer" value="wp-test.php" /><li>Current author: <strong>Alex Shiels</strong><br />Create user <input type="text" value="Alex Shiels" name="user[]" maxlength="30"> <br /> or map to existing<select name="userselect[0]"> 95 95 EOF; 96 $this->assert Equals( $expected, mask_input_value( $in ) );96 $this->assertSame( $expected, mask_input_value( $in ) ); 97 97 } 98 98 }
Note: See TracChangeset
for help on using the changeset viewer.