Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sebastianbergmann/phpunit
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.8.23
Choose a base ref
...
head repository: sebastianbergmann/phpunit
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.8.24
Choose a head ref
  • 9 commits
  • 20 files changed
  • 4 contributors

Commits on Feb 23, 2016

  1. Closes #2039

    Sebastian Bergmann authored and Sebastian Bergmann committed Feb 23, 2016

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    72bd997 View commit details
  2. Update ChangeLog

    Sebastian Bergmann authored and Sebastian Bergmann committed Feb 23, 2016
    Copy the full SHA
    264188d View commit details

Commits on Mar 10, 2016

  1. Copy the full SHA
    a093bd8 View commit details
  2. Reorganize

    sebastianbergmann committed Mar 10, 2016
    Copy the full SHA
    7557e56 View commit details
  3. Improve readability

    sebastianbergmann committed Mar 10, 2016
    1
    Copy the full SHA
    e423359 View commit details
  4. Update ChangeLog

    sebastianbergmann committed Mar 10, 2016
    Copy the full SHA
    7718ed2 View commit details

Commits on Mar 13, 2016

  1. Copy the full SHA
    0774df6 View commit details
  2. Update ChangeLog

    sebastianbergmann committed Mar 13, 2016
    Copy the full SHA
    10a2f5a View commit details

Commits on Mar 14, 2016

  1. Prepare release

    sebastianbergmann committed Mar 14, 2016
    Copy the full SHA
    a1066c5 View commit details
9 changes: 9 additions & 0 deletions ChangeLog-4.8.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,14 @@

All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## [4.8.24] - 2016-03-14

### Fixed

* Fixed [#1959](https://github.com/sebastianbergmann/phpunit/issues/1959): Prophecy errors are not handled correctly
* Fixed [#2039](https://github.com/sebastianbergmann/phpunit/issues/2039): TestDox does not handle snake_case test methods properly
* Fixed [#2109](https://github.com/sebastianbergmann/phpunit/issues/2109): Process isolation leaks global variable

## [4.8.23] - 2016-02-11

### Fixed
@@ -169,6 +177,7 @@ New PHAR release due to updated dependencies
* Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808)
* Changed the name of the default group from `__nogroup__` to `default`

[4.8.24]: https://github.com/sebastianbergmann/phpunit/compare/4.8.23...4.8.24
[4.8.23]: https://github.com/sebastianbergmann/phpunit/compare/4.8.22...4.8.23
[4.8.22]: https://github.com/sebastianbergmann/phpunit/compare/4.8.21...4.8.22
[4.8.21]: https://github.com/sebastianbergmann/phpunit/compare/4.8.20...4.8.21
14 changes: 6 additions & 8 deletions src/Framework/Constraint/TraversableContains.php
Original file line number Diff line number Diff line change
@@ -71,19 +71,17 @@ protected function matches($other)

if (is_object($this->value)) {
foreach ($other as $element) {
if (($this->checkForObjectIdentity &&
$element === $this->value) ||
(!$this->checkForObjectIdentity &&
$element == $this->value)) {
if ($this->checkForObjectIdentity && $element === $this->value) {
return true;
} else if (!$this->checkForObjectIdentity && $element == $this->value) {
return true;
}
}
} else {
foreach ($other as $element) {
if (($this->checkForNonObjectIdentity &&
$element === $this->value) ||
(!$this->checkForNonObjectIdentity &&
$element == $this->value)) {
if ($this->checkForNonObjectIdentity && $element === $this->value) {
return true;
} else if (!$this->checkForNonObjectIdentity && $element == $this->value) {
return true;
}
}
2 changes: 1 addition & 1 deletion src/Framework/TestCase.php
Original file line number Diff line number Diff line change
@@ -1004,7 +1004,7 @@ protected function verifyMockObjects()
if ($this->prophet !== null) {
try {
$this->prophet->checkPredictions();
} catch (Throwable $t) {
} catch (Throwable $e) {
/* Intentionally left empty */
} catch (Exception $e) {
/* Intentionally left empty */
2 changes: 1 addition & 1 deletion src/Runner/Version.php
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public static function id()
}

if (self::$version === null) {
$version = new SebastianBergmann\Version('4.8.23', dirname(dirname(__DIR__)));
$version = new SebastianBergmann\Version('4.8.24', dirname(dirname(__DIR__)));
self::$version = $version->getVersion();
}

1 change: 1 addition & 0 deletions src/Util/PHP/Template/TestCaseMethod.tpl.dist
Original file line number Diff line number Diff line change
@@ -75,6 +75,7 @@ $configurationFilePath = '{configurationFilePath}';
if ('' !== $configurationFilePath) {
$configuration = PHPUnit_Util_Configuration::getInstance($configurationFilePath);
$configuration->handlePHPConfiguration();
unset($configuration);
}

{constants}
18 changes: 8 additions & 10 deletions src/Util/TestDox/NamePrettifier.php
Original file line number Diff line number Diff line change
@@ -81,23 +81,21 @@ public function prettifyTestMethod($name)
$this->strings[] = $string;
}

if (strpos($name, '_') !== false) {
return str_replace('_', ' ', $name);
if (substr($name, 0, 4) == 'test') {
$name = substr($name, 4);
}

$max = strlen($name);
$name[0] = strtoupper($name[0]);

if (substr($name, 0, 4) == 'test') {
$offset = 4;
} else {
$offset = 0;
$name[0] = strtoupper($name[0]);
if (strpos($name, '_') !== false) {
return trim(str_replace('_', ' ', $name));
}

$max = strlen($name);
$wasNumeric = false;

for ($i = $offset; $i < $max; $i++) {
if ($i > $offset &&
for ($i = 0; $i < $max; $i++) {
if ($i > 0 &&
ord($name[$i]) >= 65 &&
ord($name[$i]) <= 90) {
$buffer .= ' ' . strtolower($name[$i]);
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ $_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = 'Issue1021Test';
$_SERVER['argv'][3] = dirname(__FILE__) . '/1021/Issue1021Test.php';

require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/../../bootstrap.php';
PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ $_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = 'Issue523Test';
$_SERVER['argv'][3] = dirname(__FILE__) . '/523/Issue523Test.php';

require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/../../bootstrap.php';
PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ $_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = 'Issue578Test';
$_SERVER['argv'][3] = dirname(__FILE__) . '/578/Issue578Test.php';

require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/../../bootstrap.php';
PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ $_SERVER['argv'][1] = '--no-configuration';
$_SERVER['argv'][2] = 'Issue684Test';
$_SERVER['argv'][3] = dirname(__FILE__) . '/684/Issue684Test.php';

require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/../../bootstrap.php';
PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ $_SERVER['argv'][3] = 'foo,bar';
$_SERVER['argv'][4] = 'ParentSuite';
$_SERVER['argv'][5] = dirname(__FILE__) . '/783/ParentSuite.php';

require __DIR__ . '/../bootstrap.php';
require __DIR__ . '/../../bootstrap.php';
PHPUnit_TextUI_Command::main();
?>
--EXPECTF--
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/Util/TestDox/NamePrettifierTest.php
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ public function testTestNameIsConvertedToASentence()
{
$this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('testThisIsATest'));
$this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('testThisIsATest2'));
$this->assertEquals('this is a test', $this->namePrettifier->prettifyTestMethod('this_is_a_test'));
$this->assertEquals('This is a test', $this->namePrettifier->prettifyTestMethod('this_is_a_test'));
$this->assertEquals('Foo for bar is 0', $this->namePrettifier->prettifyTestMethod('testFooForBarIs0'));
$this->assertEquals('Foo for baz is 1', $this->namePrettifier->prettifyTestMethod('testFooForBazIs1'));
}