Skip to content

Commit 141e1bd

Browse files
committed
Fix tests for PHP 7.2 and 7.3
PHP 7.2 and 7.3 tokenize "<?php" string without any additional tokens as T_INLINE_HTML instead of T_OPEN_TAG. Let's just fix the tests.
1 parent c43930c commit 141e1bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/Blueprints/Tests/Unit/Steps/DefineConstantsStepTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function testAddNewConstants() {
3434
}
3535

3636
public function testAddNewConstantsToEmptyWpConfig() {
37-
$this->runtime->getTargetFilesystem()->put_contents( 'wp-config.php', '<?php' );
37+
$this->runtime->getTargetFilesystem()->put_contents( 'wp-config.php', "<?php\n" );
3838
$constants = [
3939
'WP_MEMORY_LIMIT' => '256M',
4040
'AUTOMATIC_UPDATER_DISABLED' => true,
@@ -44,7 +44,7 @@ public function testAddNewConstantsToEmptyWpConfig() {
4444
$this->assertWordPressConstants( $constants );
4545

4646
$this->assertSame(
47-
"<?php\ndefine( 'WP_MEMORY_LIMIT', '256M' );\ndefine( 'AUTOMATIC_UPDATER_DISABLED', true );\n\n",
47+
"<?php\n\ndefine( 'WP_MEMORY_LIMIT', '256M' );\ndefine( 'AUTOMATIC_UPDATER_DISABLED', true );\n\n",
4848
$this->runtime->getTargetFilesystem()->get_contents( 'wp-config.php' )
4949
);
5050

0 commit comments

Comments
 (0)