Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
setup
src
Magento
Setup
Test
Unit
Console
Command
InfoAdminUriCommandTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Setup\Test\Unit\Console\Command
;
7
8
use
Magento\Setup\Console\Command\InfoAdminUriCommand
;
9
use Symfony\Component\Console\Tester\CommandTester;
10
use
Magento\Framework\Setup\BackendFrontnameGenerator
;
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
31
$regexp =
'/'
.
BackendFrontnameGenerator::ADMIN_AREA_PATH_PREFIX
32
.
'[a-z0-9]{1,'
.
BackendFrontnameGenerator::ADMIN_AREA_PATH_RANDOM_PART_LENGTH
.
'}/'
;
33
34
$this->assertRegExp($regexp, $commandTester->getDisplay(),
'Unexpected Backend Frontname pattern.'
);
35
}
36
}
Magento\Setup\Test\Unit\Console\Command
Definition:
AdminUserCreateCommandTest.php:6
Magento\Framework\App
Magento\Setup\Console\Command\InfoAdminUriCommand
Definition:
InfoAdminUriCommand.php:14
Magento\Setup\Test\Unit\Console\Command\InfoAdminUriCommandTest
Definition:
InfoAdminUriCommandTest.php:12
Magento\Framework\Setup\BackendFrontnameGenerator
Definition:
BackendFrontnameGenerator.php:12
Magento
Magento\Setup\Test\Unit\Console\Command\InfoAdminUriCommandTest\$deploymentConfig
$deploymentConfig
Definition:
InfoAdminUriCommandTest.php:17
Magento\Framework\Setup\BackendFrontnameGenerator\ADMIN_AREA_PATH_PREFIX
const ADMIN_AREA_PATH_PREFIX
Definition:
BackendFrontnameGenerator.php:17
Magento\Setup\Test\Unit\Console\Command\InfoAdminUriCommandTest\testExecute
testExecute()
Definition:
InfoAdminUriCommandTest.php:24
Magento\Setup\Test\Unit\Console\Command\InfoAdminUriCommandTest\setup
setup()
Definition:
InfoAdminUriCommandTest.php:19
Magento\Framework\Setup\BackendFrontnameGenerator\ADMIN_AREA_PATH_RANDOM_PART_LENGTH
const ADMIN_AREA_PATH_RANDOM_PART_LENGTH
Definition:
BackendFrontnameGenerator.php:22