Skip to content

Commit 733e21d

Browse files
committed
test: command progress
1 parent ee23ec1 commit 733e21d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/Input/CommandTest.php

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

1414
use Ahc\Cli\Application;
1515
use Ahc\Cli\Input\Command;
16+
use Ahc\Cli\Output\ProgressBar;
1617
use InvalidArgumentException;
1718
use PHPUnit\Framework\TestCase;
1819
use RuntimeException;
@@ -272,6 +273,17 @@ public function test_unset()
272273
$this->assertArrayNotHasKey('verbosity', $c->allOptions());
273274
}
274275

276+
public function test_progress()
277+
{
278+
new class($this) extends Command {
279+
public function __construct($tester)
280+
{
281+
$this->_app = null;
282+
$tester->assertInstanceOf(ProgressBar::class, $this->progress(10));
283+
}
284+
};
285+
}
286+
275287
protected function newCommand(string $version = '0.0.1', string $desc = '', bool $allowUnknown = false, $app = null)
276288
{
277289
$p = new Command('cmd', $desc, $allowUnknown, $app);

0 commit comments

Comments
 (0)