Skip to content

Commit 4ed7bd3

Browse files
Fix data provider
1 parent e693660 commit 4ed7bd3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Tests/Console/MassiveOutputFormatterTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Massive\Bundle\BuildBundle\Console\MassiveOutputFormatter;
1515
use Massive\Bundle\BuildBundle\Tests\BaseTestCase;
16+
use PHPUnit\Framework\Attributes\DataProvider;
1617

1718
class MassiveOutputFormatterTest extends BaseTestCase
1819
{
@@ -23,6 +24,7 @@ class MassiveOutputFormatterTest extends BaseTestCase
2324
*
2425
* @dataProvider getDecorationDataProvider
2526
*/
27+
#[DataProvider('getDecorationDataProvider')]
2628
public function testThatOutputWillBeDecorated($message, $indent, $expected)
2729
{
2830
$formatter = new MassiveOutputFormatter(true);
@@ -33,11 +35,9 @@ public function testThatOutputWillBeDecorated($message, $indent, $expected)
3335

3436
public static function getDecorationDataProvider()
3537
{
36-
return [
37-
['Some string', 0, 'Some string'],
38-
['Some string', 1, ' Some string'],
39-
['Some string', 2, ' Some string'],
40-
];
38+
yield ['Some string', 0, 'Some string'];
39+
yield ['Some string', 1, ' Some string'];
40+
yield ['Some string', 2, ' Some string'];
4141
}
4242

4343
/**
@@ -46,6 +46,7 @@ public static function getDecorationDataProvider()
4646
*
4747
* @dataProvider getNonDecorationDataProvider
4848
*/
49+
#[DataProvider('getNonDecorationDataProvider')]
4950
public function testThatOutputWillNotBeDecorated($message, $indent)
5051
{
5152
$formatter = new MassiveOutputFormatter(false);

0 commit comments

Comments
 (0)