Allowed to display tags in the shortcode:list command

This commit is contained in:
Alejandro Celaya
2016-08-21 10:17:17 +02:00
parent e3021120e3
commit 2b89556c09
3 changed files with 46 additions and 3 deletions

View File

@@ -108,6 +108,23 @@ class ListShortcodesCommandTest extends TestCase
]);
}
/**
* @test
*/
public function ifTagsFlagIsProvidedTagsColumnIsIncluded()
{
$this->questionHelper->setInputStream($this->getInputStream('\n'));
$this->shortUrlService->listShortUrls(1)->willReturn(new Paginator(new ArrayAdapter()))
->shouldBeCalledTimes(1);
$this->commandTester->execute([
'command' => 'shortcode:list',
'--tags' => true,
]);
$output = $this->commandTester->getDisplay();
$this->assertTrue(strpos($output, 'Tags') > 0);
}
protected function getInputStream($inputData)
{
$stream = fopen('php://memory', 'r+', false);