Changeset 54349 for trunk/tests/phpunit/tests/l10n/loadScriptTextdomain.php
- Timestamp:
- 09/28/2022 05:31:53 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/l10n/loadScriptTextdomain.php
r53866 r54349 132 132 return $relative; 133 133 } 134 135 /** 136 * Tests that PHP 8.1 "passing null to non-nullable" deprecation notice 137 * is not thrown when passing the default `$path` to untrailingslashit() in the function. 138 * 139 * The notice that we should not see: 140 * `Deprecated: rtrim(): Passing null to parameter #1 ($string) of type string is deprecated`. 141 * 142 * @ticket 55967 143 */ 144 public function test_does_not_throw_deprecation_notice_for_rtrim_with_default_parameters() { 145 $handle = 'test-example-root'; 146 $src = '/wp-includes/js/script.js'; 147 148 wp_enqueue_script( $handle, $src ); 149 150 $expected = file_get_contents( DIR_TESTDATA . '/languages/en_US-813e104eb47e13dd4cc5af844c618754.json' ); 151 $this->assertSame( $expected, load_script_textdomain( $handle ) ); 152 } 134 153 }
Note: See TracChangeset
for help on using the changeset viewer.