module/CLI/test/Command/Api/DisableKeyCommandTest.php 1 location
|
@@ 24-31 (lines=8) @@
|
| 21 |
|
*/ |
| 22 |
|
protected $apiKeyService; |
| 23 |
|
|
| 24 |
|
public function setUp() |
| 25 |
|
{ |
| 26 |
|
$this->apiKeyService = $this->prophesize(ApiKeyService::class); |
| 27 |
|
$command = new DisableKeyCommand($this->apiKeyService->reveal(), Translator::factory([])); |
| 28 |
|
$app = new Application(); |
| 29 |
|
$app->add($command); |
| 30 |
|
$this->commandTester = new CommandTester($command); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
/** |
| 34 |
|
* @test |
module/CLI/test/Command/Api/GenerateKeyCommandTest.php 1 location
|
@@ 24-31 (lines=8) @@
|
| 21 |
|
*/ |
| 22 |
|
protected $apiKeyService; |
| 23 |
|
|
| 24 |
|
public function setUp() |
| 25 |
|
{ |
| 26 |
|
$this->apiKeyService = $this->prophesize(ApiKeyService::class); |
| 27 |
|
$command = new GenerateKeyCommand($this->apiKeyService->reveal(), Translator::factory([])); |
| 28 |
|
$app = new Application(); |
| 29 |
|
$app->add($command); |
| 30 |
|
$this->commandTester = new CommandTester($command); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
/** |
| 34 |
|
* @test |
module/CLI/test/Command/Api/ListKeysCommandTest.php 1 location
|
@@ 24-31 (lines=8) @@
|
| 21 |
|
*/ |
| 22 |
|
protected $apiKeyService; |
| 23 |
|
|
| 24 |
|
public function setUp() |
| 25 |
|
{ |
| 26 |
|
$this->apiKeyService = $this->prophesize(ApiKeyService::class); |
| 27 |
|
$command = new ListKeysCommand($this->apiKeyService->reveal(), Translator::factory([])); |
| 28 |
|
$app = new Application(); |
| 29 |
|
$app->add($command); |
| 30 |
|
$this->commandTester = new CommandTester($command); |
| 31 |
|
} |
| 32 |
|
|
| 33 |
|
/** |
| 34 |
|
* @test |
module/CLI/test/Command/Shortcode/GetVisitsCommandTest.php 1 location
|
@@ 26-33 (lines=8) @@
|
| 23 |
|
*/ |
| 24 |
|
protected $visitsTracker; |
| 25 |
|
|
| 26 |
|
public function setUp() |
| 27 |
|
{ |
| 28 |
|
$this->visitsTracker = $this->prophesize(VisitsTrackerInterface::class); |
| 29 |
|
$command = new GetVisitsCommand($this->visitsTracker->reveal(), Translator::factory([])); |
| 30 |
|
$app = new Application(); |
| 31 |
|
$app->add($command); |
| 32 |
|
$this->commandTester = new CommandTester($command); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
/** |
| 36 |
|
* @test |
module/CLI/test/Command/Shortcode/ListShortcodesCommandTest.php 1 location
|
@@ 32-41 (lines=10) @@
|
| 29 |
|
*/ |
| 30 |
|
protected $shortUrlService; |
| 31 |
|
|
| 32 |
|
public function setUp() |
| 33 |
|
{ |
| 34 |
|
$this->shortUrlService = $this->prophesize(ShortUrlServiceInterface::class); |
| 35 |
|
$app = new Application(); |
| 36 |
|
$command = new ListShortcodesCommand($this->shortUrlService->reveal(), Translator::factory([])); |
| 37 |
|
$app->add($command); |
| 38 |
|
|
| 39 |
|
$this->questionHelper = $command->getHelper('question'); |
| 40 |
|
$this->commandTester = new CommandTester($command); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
/** |
| 44 |
|
* @test |
module/CLI/test/Command/Shortcode/ResolveUrlCommandTest.php 1 location
|
@@ 24-32 (lines=9) @@
|
| 21 |
|
*/ |
| 22 |
|
protected $urlShortener; |
| 23 |
|
|
| 24 |
|
public function setUp() |
| 25 |
|
{ |
| 26 |
|
$this->urlShortener = $this->prophesize(UrlShortener::class); |
| 27 |
|
$command = new ResolveUrlCommand($this->urlShortener->reveal(), Translator::factory([])); |
| 28 |
|
$app = new Application(); |
| 29 |
|
$app->add($command); |
| 30 |
|
|
| 31 |
|
$this->commandTester = new CommandTester($command); |
| 32 |
|
} |
| 33 |
|
|
| 34 |
|
/** |
| 35 |
|
* @test |