Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SelectorTest.php
Go to the documentation of this file.
1 <?php
7 
12 class SelectorTest extends \PHPUnit\Framework\TestCase
13 {
17  public function testGetModeUrl()
18  {
21  \Magento\Framework\View\LayoutInterface::class
22  );
23 
25  $block = $layout->createBlock(\Magento\UrlRewrite\Block\Selector::class);
26 
27  $modeUrl = $block->getModeUrl('mode');
28  $this->assertEquals(1, preg_match('/admin\/index\/index\/key\/[0-9a-zA-Z]+\/mode/', $modeUrl));
29  }
30 }
$block
Definition: block.php:8