Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch '6.5'
  • Loading branch information
sebastianbergmann committed Jan 26, 2018
2 parents 3e2ff3b + c4cdf0e commit 6798efe
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog-5.7.md
Expand Up @@ -7,6 +7,8 @@ All notable changes of the PHPUnit 5.7 release series are documented in this fil
### Fixed

* Fixed [#2236](https://github.com/sebastianbergmann/phpunit/issues/2236): Exceptions in `tearDown()` do not affect `getStatus()`
* Fixed [#2950](https://github.com/sebastianbergmann/phpunit/issues/2950): Class extending `PHPUnit\Framework\TestSuite` does not extend `PHPUnit\FrameworkTestCase`
* Fixed [#2972](https://github.com/sebastianbergmann/phpunit/issues/2972): PHPUnit crashes when test suite contains both `.phpt` files and unconventionally named tests

## [5.7.26] - 2017-12-17

Expand Down
2 changes: 2 additions & 0 deletions ChangeLog-6.5.md
Expand Up @@ -7,6 +7,8 @@ All notable changes of the PHPUnit 6.5 release series are documented in this fil
### Fixed

* Fixed [#2236](https://github.com/sebastianbergmann/phpunit/issues/2236): Exceptions in `tearDown()` do not affect `getStatus()`
* Fixed [#2950](https://github.com/sebastianbergmann/phpunit/issues/2950): Class extending `PHPUnit\Framework\TestSuite` does not extend `PHPUnit\FrameworkTestCase`
* Fixed [#2972](https://github.com/sebastianbergmann/phpunit/issues/2972): PHPUnit crashes when test suite contains both `.phpt` files and unconventionally named tests

## [6.5.5] - 2017-12-17

Expand Down
2 changes: 1 addition & 1 deletion src/Framework/TestSuite.php
Expand Up @@ -305,7 +305,7 @@ public function addTestSuite($testClass): void
}
}

if (!$suiteMethod && !$testClass->isAbstract()) {
if (!$suiteMethod && !$testClass->isAbstract() && $testClass->isSubclassOf(TestCase::class)) {
$this->addTest(new self($testClass));
}
} else {
Expand Down
18 changes: 18 additions & 0 deletions tests/Regression/GitHub/2972.phpt
@@ -0,0 +1,18 @@
--TEST--
GH-2972: Test suite shouldn't fail when it contains both *.phpt files and unconventionally named tests
--FILE--
<?php
$_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = __DIR__ . '/2972/';

require __DIR__ . '/../../bootstrap.php';
PHPUnit\TextUI\Command::main();
?>
--EXPECTF--
PHPUnit %s by Sebastian Bergmann and contributors.

.. 2 / 2 (100%)

Time: %s, Memory: %s

OK (2 tests, 2 assertions)
10 changes: 10 additions & 0 deletions tests/Regression/GitHub/2972/issue-2972-test.phpt
@@ -0,0 +1,10 @@
--TEST--
Just a sample test for issue 2972, does not actually test anything
--FILE--
<?php
echo "Hello world\n";
?>
===DONE===
--EXPECT--
Hello world
===DONE===
13 changes: 13 additions & 0 deletions tests/Regression/GitHub/2972/unconventiallyNamedIssue2972Test.php
@@ -0,0 +1,13 @@
<?php

namespace Issue2972;

use PHPUnit\Framework\TestCase;

class Issue2972Test extends TestCase
{
public function testHello()
{
$this->assertNotEmpty('Hello world!');
}
}

0 comments on commit 6798efe

Please sign in to comment.