You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- fixed many issues (thanks again David Paz)
- build: fixed cwdname()
- build: phpunit vendor windows platform support
- build: always, ignore errors
- added safe cwd handling in examples test
- added allowed skipping in example tests
- added xmlseq stream-wrapper de-regristation in tests
- added regex expectations in examples test
- ci: init travis
echo"ERROR: Unable to validate version '$version'.\n";
112
111
$errors++;
113
112
returnfalse;
@@ -143,7 +142,7 @@ function built_test_composer_validate_json(&$errors)
143
142
144
143
$command = "$composer --no-ansi --version";
145
144
146
-
$lastline = exec($command, $output, $exitCode);
145
+
exec($command, $output, $exitCode);
147
146
list($versionLine) = $output;
148
147
if (!preg_match('~^Composer version (?:1.0-dev \([0-9a-f]{40}\)|[0-9a-f]{40}) 2\d{3}-(?:0\d|1[0-2])-(?:[0-2]\d|3[0-1]) (?:[0-1]\d|2[0-3]):[0-5]\d:(?:[0-5]\d|60)$~', $versionLine)) {
149
148
echo"ERROR: Unable to invoke Composer.\n";
@@ -172,12 +171,16 @@ function build_test_tests(&$errors)
172
171
{
173
172
echo"INFO: Running phpunit testuite before building:\n";
174
173
175
-
$phpunit = 'phpunit';
174
+
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
175
+
$phpunit = '.\vendor\bin\phpunit.bat';
176
+
} else {
177
+
$phpunit = './vendor/bin/phpunit';
178
+
}
176
179
177
180
$command = "$phpunit --version";
178
181
179
-
$lastline = exec($command, $output, $exitCode);
180
-
list($versionLine) = $output;
182
+
exec($command, $output, $exitCode);
183
+
list($versionLine) = $output + array(null);
181
184
if (!preg_match('~^PHPUnit \d\.\d\.\d+ by Sebastian Bergmann\.$~', $versionLine)) {
182
185
echo"ERROR: Unable to invoke PHPUnit.\n";
183
186
$errors++;
@@ -228,9 +231,10 @@ function build_test_autoload_file(&$errors, $autoLoadFile)
228
231
}
229
232
230
233
/**
231
-
* @param $errors
232
-
* @param $concatenateFile
233
-
* @param $autoLoadFile
234
+
* @param int $errors
235
+
* @param string $concatenateFile
236
+
* @param string $autoLoadFile
237
+
* @param string $version
234
238
*
235
239
* @internal param $buildDir
236
240
* @internal param $concatenateFileHandle
@@ -405,16 +409,17 @@ function fseek_first_empty_line($handle)
405
409
functioncwdname($path)
406
410
{
407
411
static$base;
408
-
$base || $base = realpath('.');
409
-
$result = realpath($path);
412
+
isset($base) || $base = realpath('.');
410
413
411
-
if (substr($result, 0, strlen($base)) === $base) {
0 commit comments