-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reproduce #3246. Tests with failing individual dataprovider rows do not
mark the parent test failed.
- Loading branch information
1 parent
637780d
commit f12af46
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/* | ||
* This file is part of PHPUnit. | ||
* | ||
* (c) Sebastian Bergmann <sebastian@phpunit.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class MultiDependencyExecutionOrderTest extends TestCase | ||
{ | ||
public function testFirstTestThatAlwaysWorks() | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
|
||
/** | ||
* @dataProvider dataproviderAdditions | ||
*/ | ||
public function testAddNumbersWithADataprovider(int $a, int $b, int $sum) | ||
{ | ||
$this->assertSame($sum, $a + $b); | ||
} | ||
|
||
public function testTestInTheMiddleThatAlwaysWorks() | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
|
||
/** | ||
* @dataProvider dataproviderAdditions | ||
*/ | ||
public function testAddMoreNumbersWithADataprovider(int $a, int $b, int $sum) | ||
{ | ||
$this->assertSame($sum, $a + $b); | ||
} | ||
|
||
public function dataproviderAdditions() | ||
{ | ||
return [ | ||
'1+2=3' => [1, 2, 3], | ||
'2+1=3' => [2, 1, 3], | ||
'1+1=3' => [1, 1, 3], | ||
]; | ||
} | ||
} |