X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fshell%2FCommandTest.php;h=2e031638857d41a84cacc55d75d20e6ae8c32f27;hb=437d44db61bc22260d0c8a4be67a7e267b2fb5b8;hp=2ba7bdc011be8cff55e81c15b0ad6f2f0addc7fa;hpb=8a95833baed3b8071fcbd8cd2bc8c3449409f665;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/shell/CommandTest.php b/tests/phpunit/includes/shell/CommandTest.php index 2ba7bdc011..2e03163885 100644 --- a/tests/phpunit/includes/shell/CommandTest.php +++ b/tests/phpunit/includes/shell/CommandTest.php @@ -7,7 +7,7 @@ use Wikimedia\TestingAccessWrapper; * @covers \MediaWiki\Shell\Command * @group Shell */ -class CommandTest extends PHPUnit_Framework_TestCase { +class CommandTest extends PHPUnit\Framework\TestCase { use MediaWikiCoversValidator; @@ -170,5 +170,12 @@ class CommandTest extends PHPUnit_Framework_TestCase { $command->input( str_repeat( '!', 1000000 ) ); $result = $command->execute(); $this->assertSame( 1000000, strlen( $result->getStdout() ) ); + + // And try it with empty input + $command = new Command(); + $command->params( 'cat' ); + $command->input( '' ); + $result = $command->execute(); + $this->assertSame( '', $result->getStdout() ); } }