Skip to content

Commit acfc851

Browse files
authored
Fix PHPCS errors in Behat test files (#96)
1 parent 309af29 commit acfc851

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎features/eval.feature‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Feature: Evaluating PHP code and files.
7575
And a script.php file:
7676
"""
7777
<?php
78-
var_dump(defined("WP_CONTENT_DIR"));
78+
var_dump( defined( 'WP_CONTENT_DIR' ) );
7979
"""
8080

8181
When I try `wp eval-file script.php`
@@ -197,12 +197,12 @@ Feature: Evaluating PHP code and files.
197197
"""
198198
<?php
199199
echo '__FILE__';
200-
echo "__FILE__";
200+
echo '__FILE__';
201201
echo '"__FILE__"';
202202
echo "'__FILE__'";
203203
204204
echo ' foo __FILE__ bar ';
205-
echo " foo __FILE__ bar ";
205+
echo ' foo __FILE__ bar ';
206206
echo '" foo __FILE__ bar "';
207207
echo "' foo __FILE__ bar '";
208208
"""
@@ -291,8 +291,8 @@ Feature: Evaluating PHP code and files.
291291
And a hook-script.php file:
292292
"""
293293
<?php
294-
echo "Hook: " . current_action() . "\n";
295-
echo "Is admin: " . (is_admin() ? 'yes' : 'no') . "\n";
294+
echo 'Hook: ' . current_action() . "\n";
295+
echo 'Is admin: ' . ( is_admin() ? 'yes' : 'no' ) . "\n";
296296
"""
297297

298298
When I run `wp eval-file hook-script.php --hook=init`
@@ -326,7 +326,7 @@ Feature: Evaluating PHP code and files.
326326
And a script.php file:
327327
"""
328328
<?php
329-
echo "test";
329+
echo 'test';
330330
"""
331331

332332
When I try `wp eval-file script.php --hook=init --skip-wordpress`
@@ -341,8 +341,8 @@ Feature: Evaluating PHP code and files.
341341
And a args-script.php file:
342342
"""
343343
<?php
344-
echo "Hook: " . current_action() . "\n";
345-
echo "Args: " . implode(' ', $args) . "\n";
344+
echo 'Hook: ' . current_action() . "\n";
345+
echo 'Args: ' . implode( ' ', $args ) . "\n";
346346
"""
347347

348348
When I run `wp eval-file args-script.php arg1 arg2 --hook=init`

0 commit comments

Comments
 (0)