Skip to content

Commit ec19f16

Browse files
realFlowControlsebastianbergmann
authored andcommitted
Added tests for the --columns command line argument
1 parent 928b6e5 commit ec19f16

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

tests/end-to-end/cli/columns-max.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
phpunit --columns=max BankAccountTest ../../_files/BankAccountTest.php
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][1] = '--no-configuration';
6+
$_SERVER['argv'][2] = '--columns=max';
7+
$_SERVER['argv'][3] = 'BankAccountTest';
8+
$_SERVER['argv'][4] = __DIR__ . '/../../_files/BankAccountTest.php';
9+
10+
require __DIR__ . '/../../bootstrap.php';
11+
PHPUnit\TextUI\Command::main();
12+
--EXPECTF--
13+
PHPUnit %s by Sebastian Bergmann and contributors.
14+
15+
... 3 / 3 (100%)
16+
17+
Time: %s, Memory: %s
18+
19+
OK (3 tests, 3 assertions)

tests/end-to-end/cli/columns.phpt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
phpunit --columns=40 BankAccountTest ../../_files/BankAccountTest.php
3+
--FILE--
4+
<?php declare(strict_types=1);
5+
$_SERVER['argv'][1] = '--no-configuration';
6+
$_SERVER['argv'][2] = '--columns=40';
7+
$_SERVER['argv'][3] = 'BankAccountTest';
8+
$_SERVER['argv'][4] = __DIR__ . '/../../_files/BankAccountTest.php';
9+
10+
require __DIR__ . '/../../bootstrap.php';
11+
PHPUnit\TextUI\Command::main();
12+
--EXPECTF--
13+
PHPUnit %s by Sebastian Bergmann and contributors.
14+
15+
... 3 / 3 (100%)
16+
17+
Time: %s, Memory: %s
18+
19+
OK (3 tests, 3 assertions)

0 commit comments

Comments
 (0)