@@ -65,7 +65,12 @@ Feature: Manage maintenance mode of WordPress install.
6565
6666 Scenario : Check maintenance mode status when expression is used.
6767
68- When I run `wp eval "file_put_contents('.maintenance', '<?php \$ upgrading=(time()-601);'); " `
68+ Given a setup.php file:
69+ """
70+ <?php
71+ file_put_contents('.maintenance', '<?php $upgrading=(time()-601);');
72+ """
73+ When I run `wp eval-file setup.php`
6974 And I try `wp maintenance-mode is-active`
7075 Then the return code should be 1
7176 And STDERR should contain:
@@ -75,14 +80,29 @@ Feature: Manage maintenance mode of WordPress install.
7580
7681 Scenario : Check maintenance mode status when numeric timestamp is used.
7782
78- When I run `wp eval "file_put_contents('.maintenance', '<?php \$ upgrading=' . ( time() + 100 ) . ';'); " `
83+ Given a setup_num.php file:
84+ """
85+ <?php
86+ file_put_contents('.maintenance', '<?php $upgrading=' . ( time() + 100 ) . ';');
87+ """
88+ When I run `wp eval-file setup_num.php`
7989 And I run `wp maintenance-mode is-active`
8090 Then the return code should be 0
8191
82- When I run `wp eval "file_put_contents('.maintenance', '<?php \$ upgrading =' . ( time() + 100 ) . ';') ; " `
92+ Given a setup_num_space.php file:
93+ """
94+ <?php
95+ file_put_contents('.maintenance', '<?php $upgrading =' . ( time() + 100 ) . ';') ;
96+ """
97+ When I run `wp eval-file setup_num_space.php`
8398 And I run `wp maintenance-mode is-active`
8499 Then the return code should be 0
85100
86- When I run `wp eval "file_put_contents('.maintenance', '<?php \$ upgrading= ' . ( time() + 100 ) . ';'); " `
101+ Given a setup_num_space2.php file:
102+ """
103+ <?php
104+ file_put_contents('.maintenance', '<?php $upgrading= ' . ( time() + 100 ) . ';');
105+ """
106+ When I run `wp eval-file setup_num_space2.php`
87107 And I run `wp maintenance-mode is-active`
88108 Then the return code should be 0
0 commit comments