Skip to content

Commit 2b8ffc1

Browse files
Add test
1 parent 8816951 commit 2b8ffc1

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Configuration migration from PHPUnit 8.5 format works
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][1] = '--migrate-configuration';
6+
7+
chdir(sys_get_temp_dir());
8+
copy(__DIR__ . '/migration-from-85/phpunit-8.5.xml', 'phpunit.xml');
9+
10+
require __DIR__ . '/../../bootstrap.php';
11+
12+
PHPUnit\TextUI\Command::main(false);
13+
14+
print file_get_contents(sys_get_temp_dir() . '/phpunit.xml');
15+
print file_get_contents(sys_get_temp_dir() . '/phpunit.xml.bak');
16+
--EXPECTF--
17+
PHPUnit %s by Sebastian Bergmann and contributors.
18+
19+
Created backup: %sphpunit.xml.bak
20+
Migrated configuration: %sphpunit.xml
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.5/phpunit.xsd"
4+
bootstrap="src/Greeter.php"
5+
executionOrder="depends,defects"
6+
forceCoversAnnotation="true"
7+
beStrictAboutCoversAnnotation="true"
8+
beStrictAboutOutputDuringTests="true"
9+
beStrictAboutTodoAnnotatedTests="true"
10+
verbose="true">
11+
<testsuites>
12+
<testsuite name="default">
13+
<directory suffix="Test.php">tests</directory>
14+
</testsuite>
15+
</testsuites>
16+
17+
<filter>
18+
<whitelist processUncoveredFilesFromWhitelist="true">
19+
<directory suffix=".php">src</directory>
20+
</whitelist>
21+
</filter>
22+
</phpunit>

0 commit comments

Comments
 (0)