Skip to content

Commit

Permalink
Merge branch '7.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Oct 12, 2018
2 parents 9bda399 + bab8bbd commit 9ae14a2
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
6 changes: 6 additions & 0 deletions ChangeLog-7.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

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

## [7.4.1] - 2018-MM-DD

### Fixed

* Fixed [#3321](https://github.com/sebastianbergmann/phpunit/pull/3321): Incorrect TestDox output for data provider with indexed array

## [7.4.0] - 2018-10-05

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Util/TestDox/NamePrettifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function prettifyTestCase(TestCase $test): string
}

if ($test->usesDataProvider() && !$annotationWithPlaceholders) {
$result .= ' data set "' . $test->dataDescription() . '"';
$result .= $test->getDataSetAsString(false);
}

return $result;
Expand Down
20 changes: 18 additions & 2 deletions tests/_files/DataProviderTestDoxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DataProviderTestDoxTest extends TestCase
{
/**
* @dataProvider provider
* @testdox Does something with
* @testdox Does something
*/
public function testOne(): void
{
Expand All @@ -23,7 +23,15 @@ public function testOne(): void
/**
* @dataProvider provider
*/
public function testDoesSomethingElseWith(): void
public function testDoesSomethingElse(): void
{
$this->assertTrue(true);
}

/**
* @dataProvider providerWithIndexedArray
*/
public function testWithProviderWithIndexedArray($value): void
{
$this->assertTrue(true);
}
Expand All @@ -45,6 +53,14 @@ public function provider()
];
}

public function providerWithIndexedArray()
{
return [
['first'],
['second'],
];
}

public function placeHolderprovider(): array
{
return [
Expand Down
4 changes: 3 additions & 1 deletion tests/end-to-end/dataprovider-testdox.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ DataProviderTestDox
Does something with data set "two"
Does something else with data set "one"
Does something else with data set "two"
With provider with indexed array with data set #0
With provider with indexed array with data set #1
✔ ... true ...
✔ ... 1 ...
✔ ... 1.0 ...
Expand All @@ -29,4 +31,4 @@ DataProviderTestDox

Time: %s, Memory: %s

OK (13 tests, 13 assertions)
OK (15 tests, 15 assertions)

0 comments on commit 9ae14a2

Please sign in to comment.