Skip to content

Commit 6734789

Browse files
authored
Merge pull request #101 from akkspros/akkspros
fix typos and doc standards
2 parents 7abd9e0 + 70d3a6f commit 6734789

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

cleanup.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@
66

77
require __DIR__ . '/functions.php';
88

9-
// Check required environment variables
9+
// Check required environment variables.
1010
check_required_env();
1111

12-
// Bring some environment variables into scope
12+
// Bring some environment variables into scope.
1313
$WPT_PREPARE_DIR = getenv( 'WPT_PREPARE_DIR' );
1414
$WPT_SSH_CONNECT = getenv( 'WPT_SSH_CONNECT' );
1515
$WPT_SSH_OPTIONS = getenv( 'WPT_SSH_OPTIONS' ) ? : '-o StrictHostKeyChecking=no';
1616
$WPT_TEST_DIR = getenv( 'WPT_TEST_DIR' );
1717
$WPT_RM_TEST_DIR_CMD = getenv( 'WPT_RM_TEST_DIR_CMD' ) ? : 'rm -r ' . $WPT_TEST_DIR;
1818

19-
// Clean up the preparation directory
20-
// Only forcefully delete the .git directory, to prevent disasters otherwise
19+
// Clean up the preparation directory.
20+
// Only forcefully delete the .git directory, to prevent disasters otherwise.
2121
perform_operations( array(
2222
'rm -rf ' . escapeshellarg( $WPT_PREPARE_DIR . '/.git' ),
2323
'rm -rf ' . escapeshellarg( $WPT_PREPARE_DIR . '/node_modules/.cache' ),
2424
'rm -r ' . escapeshellarg( $WPT_PREPARE_DIR ),
2525
) );
2626

27-
// Clean up the test directory in remote environments
27+
// Clean up the test directory in remote environments.
2828
if ( ! empty( $WPT_SSH_CONNECT ) ) {
2929
perform_operations( array(
3030
'ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ' ' . escapeshellarg( $WPT_RM_TEST_DIR_CMD ),

functions.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,21 @@ function process_junit_xml( $xml_string )
9797
$results = array();
9898

9999
$results = array(
100-
'tests' => (string) $project['tests'],
100+
'tests' => (string) $project['tests'],
101101
'failures' => (string) $project['failures'],
102-
'errors' => (string) $project['errors'],
103-
'time' => (string) $project['time'],
102+
'errors' => (string) $project['errors'],
103+
'time' => (string) $project['time'],
104104
);
105105

106106
$results['testsuites'] = array();
107107
foreach ( $project->testsuite as $testsuite ) {
108108
// Handle nested testsuites like tests with data providers.
109109
$testsuite = isset( $testsuite->testsuite ) ? $testsuite->testsuite : $testsuite;
110110
$result = array(
111-
'name' => (string) $testsuite['name'],
112-
'tests' => (string) $testsuite['tests'],
111+
'name' => (string) $testsuite['name'],
112+
'tests' => (string) $testsuite['tests'],
113113
'failures' => (string) $testsuite['failures'],
114-
'errors' => (string) $testsuite['errors']
114+
'errors' => (string) $testsuite['errors']
115115
);
116116
if ( empty( $result['failures'] ) && empty( $result['errors'] ) ) {
117117
continue;
@@ -124,7 +124,7 @@ function process_junit_xml( $xml_string )
124124
if ( isset( $testcase->{$key} ) ) {
125125
$results['testsuites'][ (string) $testsuite['name'] ]['testcases'][ (string) $testcase['name'] ] = array(
126126
'name' => (string) $testcase['name'],
127-
$key => (string) $testcase->{$key},
127+
$key => (string) $testcase->{$key},
128128
);
129129
}
130130
}
@@ -153,9 +153,9 @@ function upload_results( $results, $rev, $message, $env, $api_key ) {
153153
$access_token = base64_encode( $api_key );
154154
$data = array(
155155
'results' => $results,
156-
'commit' => $rev,
156+
'commit' => $rev,
157157
'message' => $message,
158-
'env' => $env,
158+
'env' => $env,
159159
);
160160
$data_string = json_encode( $data );
161161

prepare.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
require __DIR__ . '/functions.php';
88

9-
// Check required environment variables
9+
// Check required environment variables.
1010
check_required_env();
1111

12-
// Bring some environment variables into scope
12+
// Bring some environment variables into scope.
1313
$WPT_PREPARE_DIR = getenv( 'WPT_PREPARE_DIR' );
1414
$WPT_SSH_CONNECT = getenv( 'WPT_SSH_CONNECT' );
1515
$WPT_SSH_OPTIONS = getenv( 'WPT_SSH_OPTIONS' ) ? : '-o StrictHostKeyChecking=no';
1616
$WPT_TEST_DIR = getenv( 'WPT_TEST_DIR' );
1717
$WPT_PHP_EXECUTABLE = getenv( 'WPT_PHP_EXECUTABLE') ? : 'php';
1818

19-
// Set the ssh private key if it's set
19+
// Set the ssh private key if it's set.
2020
$WPT_SSH_PRIVATE_KEY_BASE64 = getenv( 'WPT_SSH_PRIVATE_KEY_BASE64' );
2121
if ( ! empty( $WPT_SSH_PRIVATE_KEY_BASE64 ) ) {
2222
log_message( 'Securely extracting WPT_SSH_PRIVATE_KEY_BASE64 into ~/.ssh/id_rsa' );
@@ -27,7 +27,7 @@
2727
) );
2828
}
2929

30-
// Create the prepation directory and fetch corresponding files
30+
// Create the preparation directory and fetch corresponding files
3131
perform_operations( array(
3232
'mkdir -p ' . escapeshellarg( $WPT_PREPARE_DIR ),
3333
'git clone --depth=1 https://github.com/WordPress/wordpress-develop.git ' . escapeshellarg( $WPT_PREPARE_DIR ),
@@ -37,10 +37,10 @@
3737
'cd ' . escapeshellarg( $WPT_PREPARE_DIR ) . '; npm install && grunt build',
3838
) );
3939

40-
// Replace variables in the wp-config.php file
40+
// Replace variables in the wp-config.php file.
4141
log_message( 'Replacing variables in wp-tests-config.php' );
4242
$contents = file_get_contents( $WPT_PREPARE_DIR . '/wp-tests-config-sample.php' );
43-
// Log system information to same directory as test run log
43+
// Log system information to same directory as test run log.
4444
$system_logger = <<<EOT
4545
// Create the log directory to store test results
4646
if ( ! is_dir( __DIR__ . '/tests/phpunit/build/logs/' ) ) {
@@ -103,7 +103,7 @@
103103
$contents = str_replace( array_keys( $search_replace ), array_values( $search_replace ), $contents );
104104
file_put_contents( $WPT_PREPARE_DIR . '/wp-tests-config.php', $contents );
105105

106-
// Deliver all files to test environment
106+
// Deliver all files to test environment.
107107
if ( ! empty( $WPT_SSH_CONNECT ) ) {
108108
perform_operations( array(
109109
'rsync -rv --exclude=".git/" -e "ssh ' . $WPT_SSH_OPTIONS . '" ' . escapeshellarg( trailingslashit( $WPT_PREPARE_DIR ) ) . ' ' . escapeshellarg( $WPT_SSH_CONNECT . ':' . $WPT_TEST_DIR ),

report.php

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

77
require __DIR__ . '/functions.php';
88

9-
// Check required environment variables
9+
// Check required environment variables.
1010
check_required_env( false );
1111

1212
$WPT_SSH_CONNECT = getenv( 'WPT_SSH_CONNECT' );

test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
require __DIR__ . '/functions.php';
88

9-
// Check required environment variables
9+
// Check required environment variables.
1010
check_required_env();
1111

1212
$WPT_SSH_CONNECT = getenv( 'WPT_SSH_CONNECT' );
@@ -15,7 +15,7 @@
1515
$WPT_PHP_EXECUTABLE = getenv( 'WPT_PHP_EXECUTABLE' ) ? : 'php';
1616
$WPT_PHPUNIT_CMD = getenv( 'WPT_PHPUNIT_CMD' ) ? : 'cd ' . escapeshellarg( $WPT_TEST_DIR ) . '; ' . $WPT_PHP_EXECUTABLE . ' phpunit.phar';
1717

18-
// Run phpunit in the test environment
18+
// Run phpunit in the test environment.
1919
if ( ! empty( $WPT_SSH_CONNECT ) ) {
2020
$WPT_PHPUNIT_CMD = 'ssh ' . $WPT_SSH_OPTIONS . ' ' . escapeshellarg( $WPT_SSH_CONNECT ) . ' ' . escapeshellarg( $WPT_PHPUNIT_CMD );
2121
}

0 commit comments

Comments
 (0)