Skip to content

Commit 1e9a7c1

Browse files
authored
Merge pull request #17 from wp-cli/fix-dev-master-conflict
Fix conflict between dev-master and pull-request branches
2 parents 64514f9 + 9413e71 commit 1e9a7c1

7 files changed

Lines changed: 7 additions & 32 deletions

File tree

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ before_install:
3737
- phpenv config-rm xdebug.ini
3838

3939
install:
40+
- composer require wp-cli/wp-cli:dev-master
4041
- composer install
4142
- bash bin/install-package-tests.sh
4243

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"files": [ "server-command.php" ]
2323
},
2424
"require": {
25-
"wp-cli/wp-cli": "dev-master"
25+
"wp-cli/wp-cli": "*"
2626
},
2727
"require-dev": {
2828
"behat/behat": "~2.5"

features/bootstrap/FeatureContext.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
if ( ! empty( $composer->autoload->files ) ) {
2020
$contents = 'require:' . PHP_EOL;
2121
foreach( $composer->autoload->files as $file ) {
22-
$contents .= ' - ' . dirname( dirname( dirname( __FILE__ ) ) ) . '/' . $file . PHP_EOL;
22+
$contents .= ' - ' . dirname( dirname( dirname( __FILE__ ) ) ) . '/' . $file;
2323
}
2424
@mkdir( sys_get_temp_dir() . '/wp-cli-package-test/' );
2525
$project_config = sys_get_temp_dir() . '/wp-cli-package-test/config.yml';
@@ -178,9 +178,6 @@ public static function create_cache_dir() {
178178
* @param array $parameters context parameters (set them up through behat.yml)
179179
*/
180180
public function __construct( array $parameters ) {
181-
if ( getenv( 'WP_CLI_TEST_DBHOST' ) ) {
182-
self::$db_settings['dbhost'] = getenv( 'WP_CLI_TEST_DBHOST' );
183-
}
184181
$this->drop_db();
185182
$this->set_cache_dir();
186183
$this->variables['CORE_CONFIG_SETTINGS'] = Utils\assoc_args_to_str( self::$db_settings );
@@ -318,8 +315,7 @@ public function download_wp( $subdir = '' ) {
318315

319316
public function create_config( $subdir = '' ) {
320317
$params = self::$db_settings;
321-
// Replaces all characters that are not alphanumeric or an underscore into an underscore.
322-
$params['dbprefix'] = $subdir ? preg_replace( '#[^a-zA-Z\_0-9]#', '_', $subdir ) : 'wp_';
318+
$params['dbprefix'] = $subdir ?: 'wp_';
323319

324320
$params['skip-salts'] = true;
325321
$this->proc( 'wp core config', $params, $subdir )->run_check();

features/bootstrap/utils.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -823,16 +823,3 @@ function parse_str_to_argv( $arguments ) {
823823
}, $argv );
824824
return $argv;
825825
}
826-
827-
/**
828-
* Locale-independent version of basename()
829-
*
830-
* @access public
831-
*
832-
* @param string $path
833-
* @param string $suffix
834-
* @return string
835-
*/
836-
function basename( $path, $suffix = '' ) {
837-
return urldecode( \basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
838-
}

features/steps/given.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function ( $world, TableNode $table ) {
109109
}
110110
);
111111

112-
$steps->Given( '/^save (STDOUT|STDERR) ([\'].+[^\'])?\s?as \{(\w+)\}$/',
112+
$steps->Given( '/^save (STDOUT|STDERR) ([\'].+[^\'])?as \{(\w+)\}$/',
113113
function ( $world, $stream, $output_filter, $key ) {
114114

115115
$stream = strtolower( $stream );
@@ -161,4 +161,4 @@ function($world) {
161161

162162
file_put_contents( $wp_config_path, $wp_config_code );
163163
}
164-
);
164+
);

features/steps/then.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,6 @@ function ( $world, $stream ) {
145145
}
146146
);
147147

148-
$steps->Then( '/^(STDOUT|STDERR) should be a version string (<|<=|>|>=|==|=|!=|<>) ([+\w\.-]+)$/',
149-
function ( $world, $stream, $operator, $goal_ver ) {
150-
$stream = strtolower( $stream );
151-
if ( false === version_compare( trim( $world->result->$stream, "\n" ), $goal_ver, $operator ) ) {
152-
throw new Exception( $world->result );
153-
}
154-
}
155-
);
156-
157148
$steps->Then( '/^the (.+) (file|directory) should (exist|not exist|be:|contain:|not contain:)$/',
158149
function ( $world, $path, $type, $action, $expected = null ) {
159150
$path = $world->replace_variables( $path );

utils/behat-tags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
function version_tags( $prefix, $current, $operator = '<' ) {
1717
if ( ! $current )
18-
return array();
18+
return;
1919

2020
exec( "grep '@{$prefix}-[0-9\.]*' -h -o features/*.feature | uniq", $existing_tags );
2121

0 commit comments

Comments
 (0)