Skip to content

Commit 1d5c709

Browse files
committed
Test realpath
1 parent 9d72214 commit 1d5c709

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

includes/Plugin_Context.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public function __construct( $main_file ) {
5757
);
5858
}
5959

60+
$this->main_file = realpath( $this->main_file );
61+
6062
if ( false === strpos( $this->main_file, '.php' ) ) {
6163
$files = glob( $this->main_file . '/*.php' );
6264
foreach ( $files as $file ) {

tests/behat/features/plugin-check-remote.feature

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Feature: Test that the WP-CLI plugin check command works with remote ZIP url.
3535
Scenario: Test with valid ZIP
3636
When I run the WP-CLI command `plugin check https://github.com/WordPress/plugin-check/raw/trunk/tests/behat/testdata/foo-bar-wp.zip --fields=code,type --format=csv`
3737
Then STDOUT should contain:
38+
"""
39+
FILE: foo-bar-wp.php
40+
"""
41+
And STDOUT should contain:
3842
"""
3943
WordPress.WP.AlternativeFunctions.rand_mt_rand,ERROR
4044
"""

0 commit comments

Comments
 (0)