Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
InfoAdminUriCommandTest.php
Go to the documentation of this file.
1 <?php
7 
9 use Symfony\Component\Console\Tester\CommandTester;
11 
12 class InfoAdminUriCommandTest extends \PHPUnit\Framework\TestCase
13 {
17  protected $deploymentConfig;
18 
19  protected function setup()
20  {
21  $this->deploymentConfig = $this->createMock(\Magento\Framework\App\DeploymentConfig::class);
22  }
23 
24  public function testExecute()
25  {
26  $this->deploymentConfig->expects($this->once())->method('get')->willReturn('admin_qw12er');
27 
28  $commandTester = new CommandTester(new InfoAdminUriCommand($this->deploymentConfig));
29  $commandTester->execute([]);
30 
33 
34  $this->assertRegExp($regexp, $commandTester->getDisplay(), 'Unexpected Backend Frontname pattern.');
35  }
36 }