Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ThemePackageTest.php
Go to the documentation of this file.
1 <?php
7 
9 
10 class ThemePackageTest extends \PHPUnit\Framework\TestCase
11 {
19  public function testConstructBadKey($key)
20  {
21  new ThemePackage($key, 'path');
22  }
23 
27  public function constructBadKeyDataProvider()
28  {
29  return [
30  [''],
31  ['one'],
32  ['two/parts'],
33  ['four/parts/four/parts'],
34  ];
35  }
36 
37  public function testGetters()
38  {
39  $key = 'area/Vendor/name';
40  $path = 'path';
41  $object = new ThemePackage($key, $path);
42  $this->assertSame('area', $object->getArea());
43  $this->assertSame('Vendor', $object->getVendor());
44  $this->assertSame('name', $object->getName());
45  $this->assertSame($key, $object->getKey());
46  $this->assertSame($path, $object->getPath());
47  }
48 }