| @@ 48-67 (lines=20) @@ | ||
| 45 | $this->commandTester = new CommandTester($command); |
|
| 46 | } |
|
| 47 | ||
| 48 | protected function createInputStream() |
|
| 49 | { |
|
| 50 | $stream = fopen('php://memory', 'r+', false); |
|
| 51 | fputs($stream, <<<CLI_INPUT |
|
| 52 | ||
| 53 | shlink_db |
|
| 54 | alejandro |
|
| 55 | 1234 |
|
| 56 | 0 |
|
| 57 | doma.in |
|
| 58 | abc123BCA |
|
| 59 | ||
| 60 | 1 |
|
| 61 | my_secret |
|
| 62 | CLI_INPUT |
|
| 63 | ); |
|
| 64 | rewind($stream); |
|
| 65 | ||
| 66 | return $stream; |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * @test |
|
| @@ 128-135 (lines=8) @@ | ||
| 125 | $this->assertTrue(strpos($output, 'Tags') > 0); |
|
| 126 | } |
|
| 127 | ||
| 128 | protected function getInputStream($inputData) |
|
| 129 | { |
|
| 130 | $stream = fopen('php://memory', 'r+', false); |
|
| 131 | fputs($stream, $inputData); |
|
| 132 | rewind($stream); |
|
| 133 | ||
| 134 | return $stream; |
|
| 135 | } |
|
| 136 | } |
|
| 137 | ||