Skip to content

Commit

Permalink
Reproduce #3246. Tests with failing individual dataprovider rows do not
Browse files Browse the repository at this point in the history
mark the parent test failed.
  • Loading branch information
epdenouden authored and sebastianbergmann committed Nov 14, 2018
1 parent 637780d commit f12af46
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions tests/_files/MultiDependencyExecutionOrderTest.php
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],
];
}
}

0 comments on commit f12af46

Please sign in to comment.