Skip to content

Commit 590279c

Browse files
committed
Adding table transform
1 parent 6caec73 commit 590279c

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace PhpBench\Pipeline\Tests\Unit\Extension\Console\Stage;
4+
5+
use PhpBench\Pipeline\Tests\Unit\Extension\Console\ConsoleTestCase;
6+
7+
class TableTest extends ConsoleTestCase
8+
{
9+
/**
10+
* @dataProvider provideTransformsInputIntoATable
11+
*/
12+
public function testTransformsInputIntoATable(array $input, string $expected)
13+
{
14+
$pipeline = $this->pipeline()
15+
->stage('console/table');
16+
17+
$output = $pipeline->run($input);
18+
19+
$this->assertEquals($expected, $output);
20+
}
21+
22+
public function provideTransformsInputIntoATable()
23+
{
24+
yield 'single array element' => [
25+
[ 'hallo' ],
26+
<<<EOT
27+
0
28+
-----
29+
hallo
30+
EOT
31+
];
32+
}
33+
}

0 commit comments

Comments
 (0)