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.5
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.6
Choose a head ref
  • 4 commits
  • 8 files changed
  • 2 contributors

Commits on Aug 20, 2015

  1. Fix CS/WS issues

    sebastianbergmann committed Aug 20, 2015
    Copy the full SHA
    a7df5a5 View commit details

Commits on Aug 24, 2015

  1. Verified

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

    sebastianbergmann committed Aug 24, 2015
    Copy the full SHA
    df87c25 View commit details
  3. Prepare release

    sebastianbergmann committed Aug 24, 2015
    Copy the full SHA
    2246830 View commit details
Showing with 390 additions and 336 deletions.
  1. +7 −0 ChangeLog-4.8.md
  2. +332 −332 src/Framework/Assert/Functions.php
  3. +2 −2 src/Framework/TestCase.php
  4. +1 −1 src/Runner/Version.php
  5. +0 −1 src/TextUI/Command.php
  6. +32 −0 tests/Framework/TestCaseTest.php
  7. +8 −0 tests/_files/TestIncomplete.php
  8. +8 −0 tests/_files/TestSkipped.php
7 changes: 7 additions & 0 deletions ChangeLog-4.8.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,12 @@

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.6] - 2015-08-24

### Fixed

* Fixed [#1835](https://github.com/sebastianbergmann/phpunit/issues/1835): Skipped test reported as errored since PHPUnit 4.7.4

## [4.8.5] - 2015-08-19

### Fixed
@@ -47,6 +53,7 @@ All notable changes of the PHPUnit 4.8 release series are documented in this fil
* 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.6]: https://github.com/sebastianbergmann/phpunit/compare/4.8.5...4.8.6
[4.8.5]: https://github.com/sebastianbergmann/phpunit/compare/4.8.4...4.8.5
[4.8.4]: https://github.com/sebastianbergmann/phpunit/compare/4.8.3...4.8.4
[4.8.3]: https://github.com/sebastianbergmann/phpunit/compare/4.8.2...4.8.3
664 changes: 332 additions & 332 deletions src/Framework/Assert/Functions.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
@@ -766,9 +766,9 @@ public function runBare()
$e = $_e;
}

if (isset($e)) {
if (isset($_e)) {
$this->status = PHPUnit_Runner_BaseTestRunner::STATUS_ERROR;
$this->statusMessage = $e->getMessage();
$this->statusMessage = $_e->getMessage();
}

// Clean up the mock objects.
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.5', dirname(dirname(__DIR__)));
$version = new SebastianBergmann\Version('4.8.6', dirname(dirname(__DIR__)));
self::$version = $version->getVersion();
}

1 change: 0 additions & 1 deletion src/TextUI/Command.php
Original file line number Diff line number Diff line change
@@ -592,7 +592,6 @@ protected function handleArguments(array $argv)
$this->arguments['stderr'] = $phpunit['stderr'];
}


if (isset($phpunit['columns']) && ! isset($this->arguments['columns'])) {
$this->arguments['columns'] = $phpunit['columns'];
}
32 changes: 32 additions & 0 deletions tests/Framework/TestCaseTest.php
Original file line number Diff line number Diff line change
@@ -47,8 +47,10 @@ public function testSuccess()
$test = new Success;
$result = $test->run();

$this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_PASSED, $test->getStatus());
$this->assertEquals(0, $result->errorCount());
$this->assertEquals(0, $result->failureCount());
$this->assertEquals(0, $result->skippedCount());
$this->assertEquals(1, count($result));
}

@@ -57,8 +59,10 @@ public function testFailure()
$test = new Failure;
$result = $test->run();

$this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, $test->getStatus());
$this->assertEquals(0, $result->errorCount());
$this->assertEquals(1, $result->failureCount());
$this->assertEquals(0, $result->skippedCount());
$this->assertEquals(1, count($result));
}

@@ -67,8 +71,36 @@ public function testError()
$test = new TestError;
$result = $test->run();

$this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_ERROR, $test->getStatus());
$this->assertEquals(1, $result->errorCount());
$this->assertEquals(0, $result->failureCount());
$this->assertEquals(0, $result->skippedCount());
$this->assertEquals(1, count($result));
}

public function testSkipped()
{
$test = new TestSkipped();
$result = $test->run();

$this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, $test->getStatus());
$this->assertEquals('Skipped test', $test->getStatusMessage());
$this->assertEquals(0, $result->errorCount());
$this->assertEquals(0, $result->failureCount());
$this->assertEquals(1, $result->skippedCount());
$this->assertEquals(1, count($result));
}

public function testIncomplete()
{
$test = new TestIncomplete();
$result = $test->run();

$this->assertEquals(PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, $test->getStatus());
$this->assertEquals('Incomplete test', $test->getStatusMessage());
$this->assertEquals(0, $result->errorCount());
$this->assertEquals(0, $result->failureCount());
$this->assertEquals(0, $result->skippedCount());
$this->assertEquals(1, count($result));
}

8 changes: 8 additions & 0 deletions tests/_files/TestIncomplete.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
class TestIncomplete extends PHPUnit_Framework_TestCase
{
protected function runTest()
{
$this->markTestIncomplete('Incomplete test');
}
}
8 changes: 8 additions & 0 deletions tests/_files/TestSkipped.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
class TestSkipped extends PHPUnit_Framework_TestCase
{
protected function runTest()
{
$this->markTestSkipped('Skipped test');
}
}