Skip to content

Commit

Permalink
Add test for #5074
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 1, 2023
1 parent df0f454 commit a3549f1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/_files/OneClassPerFile/phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../phpunit.xsd">
<testsuites>
<testsuite name="default">
<directory>wrongClassName</directory>
</testsuite>
</testsuites>
</phpunit>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--TEST--
phpunit --version
--FILE--
<?php declare(strict_types=1);
$_SERVER['argv'][] = '--do-not-cache-result';
$_SERVER['argv'][] = '--configuration';
$_SERVER['argv'][] = __DIR__ . '/../../_files/OneClassPerFile/phpunit.xml';

require_once __DIR__ . '/../../bootstrap.php';

PHPUnit\TextUI\Command::main();
?>
--XFAIL--
https://github.com/sebastianbergmann/phpunit/issues/5074
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

Warning: Test case class not matching filename is deprecated
in %sWrongClassNameTest.php
Class name was 'WrongClassNameBar', expected 'WrongClassNameTest'

. 1 / 1 (100%)

Time: %s, Memory: %s

OK (1 test, 1 assertion)

0 comments on commit a3549f1

Please sign in to comment.