Skip to content

Commit f1f7643

Browse files
kubawerlossebastianbergmann
authored andcommitted
Add test showing current behaviour when testsuite is missing name attribute in XML configuration
1 parent 765a31e commit f1f7643

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit>
3+
<testsuite>
4+
<directory>tests</directory>
5+
</testsuite>
6+
</phpunit>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
phpunit --configuration=__DIR__.'/../../_files/configuration.testsuite_no_name.xml'
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][] = '--do-not-cache-result';
6+
$_SERVER['argv'][] = '--no-progress';
7+
$_SERVER['argv'][] = '--configuration';
8+
$_SERVER['argv'][] = __DIR__.'/../../_files/configuration.testsuite_no_name.xml';
9+
10+
require_once __DIR__ . '/../../bootstrap.php';
11+
(new PHPUnit\TextUI\Application)->run($_SERVER['argv']);
12+
--EXPECTF--
13+
PHPUnit %s by Sebastian Bergmann and contributors.
14+
15+
assert(!empty($name))

0 commit comments

Comments
 (0)