Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DefaultPathTest.php
Go to the documentation of this file.
1 <?php
7 
8 class DefaultPathTest extends \PHPUnit\Framework\TestCase
9 {
16  public function testGetPart($parts, $code, $result)
17  {
18  $model = new \Magento\Framework\App\DefaultPath\DefaultPath($parts);
19  $this->assertEquals($result, $model->getPart($code));
20  }
21 
25  public function dataProviderGetPart()
26  {
27  return [
28  [
29  ['code' => 'value'],
30  'code',
31  'value',
32  ],
33  [
34  ['code' => 'value'],
35  'other_code',
36  null,
37  ],
38  ];
39  }
40 }
$code
Definition: info.phtml:12