mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
enable windows tests
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
##teamcity[testSuiteStarted name='Tests\tests\Failure' locationHint='file://tests/.tests/Failure.php' flowId='1234']
|
||||
##teamcity[testSuiteStarted name='Tests/tests/Failure' locationHint='file://tests/.tests/Failure.php' flowId='1234']
|
||||
##teamcity[testStarted name='it can fail with comparison' locationHint='pest_qn://tests/.tests/Failure.php::it can fail with comparison' flowId='1234']
|
||||
##teamcity[testFailed name='it can fail with comparison' message='Failed asserting that true matches expected false.' details='at src/Mixins/Expectation.php:312|nat src/Support/ExpectationPipeline.php:75|nat src/Support/ExpectationPipeline.php:79|nat src/Expectation.php:300|nat tests/.tests/Failure.php:6|nat src/Factories/TestCaseMethodFactory.php:106|nat src/Concerns/Testable.php:262|nat src/Support/ExceptionTrace.php:28|nat src/Concerns/Testable.php:262|nat src/Concerns/Testable.php:217|nat src/Kernel.php:79' type='comparisonFailure' actual='true' expected='false' flowId='1234']
|
||||
##teamcity[testFinished name='it can fail with comparison' duration='100000' flowId='1234']
|
||||
@ -17,7 +17,7 @@
|
||||
##teamcity[testStarted name='build this one.' locationHint='pest_qn://tests/.tests/Failure.php::build this one.' flowId='1234']
|
||||
##teamcity[testIgnored name='build this one.' message='This test was ignored.' details='' flowId='1234']
|
||||
##teamcity[testFinished name='build this one.' duration='100000' flowId='1234']
|
||||
##teamcity[testSuiteFinished name='Tests\tests\Failure' flowId='1234']
|
||||
##teamcity[testSuiteFinished name='Tests/tests/Failure' flowId='1234']
|
||||
|
||||
[90mTests:[39m [31;1m2 failed[39;22m[90m,[39m[39m [39m[33;1m1 risky[39;22m[90m,[39m[39m [39m[36;1m2 todos[39;22m[90m,[39m[39m [39m[33;1m1 skipped[39;22m[90m (2 assertions)[39m
|
||||
[90mDuration:[39m [39m1.00s[39m
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
##teamcity[testSuiteStarted name='Tests\tests\SuccessOnly' locationHint='file://tests/.tests/SuccessOnly.php' flowId='1234']
|
||||
##teamcity[testSuiteStarted name='Tests/tests/SuccessOnly' locationHint='file://tests/.tests/SuccessOnly.php' flowId='1234']
|
||||
##teamcity[testStarted name='it can pass with comparison' locationHint='pest_qn://tests/.tests/SuccessOnly.php::it can pass with comparison' flowId='1234']
|
||||
##teamcity[testFinished name='it can pass with comparison' duration='100000' flowId='1234']
|
||||
##teamcity[testStarted name='can also pass' locationHint='pest_qn://tests/.tests/SuccessOnly.php::can also pass' flowId='1234']
|
||||
##teamcity[testFinished name='can also pass' duration='100000' flowId='1234']
|
||||
##teamcity[testSuiteFinished name='Tests\tests\SuccessOnly' flowId='1234']
|
||||
##teamcity[testSuiteFinished name='Tests/tests/SuccessOnly' flowId='1234']
|
||||
|
||||
[90mTests:[39m [32;1m2 passed[39;22m[90m (2 assertions)[39m
|
||||
[90mDuration:[39m [39m1.00s[39m
|
||||
|
||||
@ -1,5 +1,12 @@
|
||||
<?php
|
||||
|
||||
function normalize_windows_os_output(string $text): string
|
||||
{
|
||||
$text = str_replace('\r', '', $text);
|
||||
|
||||
return str_replace('\\', '/', $text);
|
||||
}
|
||||
|
||||
test('visual snapshot of team city', function (string $testFile) {
|
||||
$testsPath = dirname(__DIR__)."/.tests/$testFile";
|
||||
|
||||
@ -28,13 +35,9 @@ test('visual snapshot of team city', function (string $testFile) {
|
||||
};
|
||||
|
||||
if (getenv('REBUILD_SNAPSHOTS')) {
|
||||
$outputContent = explode("\n", $output());
|
||||
|
||||
file_put_contents($snapshot, implode("\n", $outputContent));
|
||||
file_put_contents($snapshot, normalize_windows_os_output($output()));
|
||||
} elseif (! getenv('EXCLUDE')) {
|
||||
$output = explode("\n", $output());
|
||||
|
||||
expect(implode("\n", $output))->toEqual(file_get_contents($snapshot));
|
||||
expect(normalize_windows_os_output($output()))->toEqual(file_get_contents($snapshot));
|
||||
}
|
||||
})->with([
|
||||
'Failure.php',
|
||||
|
||||
Reference in New Issue
Block a user