|
7 | 7 | namespace Magento\Framework\App\Test\Unit\Filesystem;
|
8 | 8 |
|
9 | 9 | use \Magento\Framework\App\Filesystem\DirectoryList;
|
10 |
| -use Magento\Framework\Code\Generator\Io; |
11 | 10 |
|
12 | 11 | class DirectoryListTest extends \PHPUnit_Framework_TestCase
|
13 | 12 | {
|
@@ -42,38 +41,28 @@ public function testUnknownDirectory()
|
42 | 41 |
|
43 | 42 | public function testGetDefaultConfig()
|
44 | 43 | {
|
45 |
| - $this->assertEquals( |
46 |
| - [ |
47 |
| - DirectoryList::ROOT => [DirectoryList::PATH => ''], |
48 |
| - DirectoryList::APP => [DirectoryList::PATH => 'app'], |
49 |
| - DirectoryList::CONFIG => [DirectoryList::PATH => 'app/etc'], |
50 |
| - DirectoryList::LIB_INTERNAL => [DirectoryList::PATH => 'lib/internal'], |
51 |
| - DirectoryList::VAR_DIR => [DirectoryList::PATH => 'var'], |
52 |
| - DirectoryList::CACHE => [DirectoryList::PATH => 'var/cache'], |
53 |
| - DirectoryList::LOG => [DirectoryList::PATH => 'var/log'], |
54 |
| - DirectoryList::DI => [DirectoryList::PATH => 'generated/metadata'], |
55 |
| - DirectoryList::GENERATION => [DirectoryList::PATH => Io::DEFAULT_DIRECTORY], |
56 |
| - DirectoryList::SESSION => [DirectoryList::PATH => 'var/session'], |
57 |
| - DirectoryList::MEDIA => [DirectoryList::PATH => 'pub/media', DirectoryList::URL_PATH => 'pub/media'], |
58 |
| - DirectoryList::STATIC_VIEW => [ |
59 |
| - DirectoryList::PATH => 'pub/static', |
60 |
| - DirectoryList::URL_PATH => 'pub/static' |
61 |
| - ], |
62 |
| - DirectoryList::PUB => [DirectoryList::PATH => 'pub', DirectoryList::URL_PATH => 'pub'], |
63 |
| - DirectoryList::LIB_WEB => [DirectoryList::PATH => 'lib/web'], |
64 |
| - DirectoryList::TMP => [DirectoryList::PATH => 'var/tmp'], |
65 |
| - DirectoryList::UPLOAD => [ |
66 |
| - DirectoryList::PATH => 'pub/media/upload', |
67 |
| - DirectoryList::URL_PATH => 'pub/media/upload' |
68 |
| - ], |
69 |
| - DirectoryList::TMP_MATERIALIZATION_DIR => [DirectoryList::PATH => 'var/view_preprocessed'], |
70 |
| - DirectoryList::TEMPLATE_MINIFICATION_DIR => [DirectoryList::PATH => 'var/view_preprocessed/html'], |
71 |
| - DirectoryList::SETUP => [DirectoryList::PATH => 'setup/src'], |
72 |
| - DirectoryList::COMPOSER_HOME => [DirectoryList::PATH => 'var/composer_home'], |
73 |
| - DirectoryList::GENERATED => [DirectoryList::PATH => 'generated'], |
74 |
| - DirectoryList::SYS_TMP => [DirectoryList::PATH => ''] |
75 |
| - ], |
76 |
| - DirectoryList::getDefaultConfig() |
77 |
| - ); |
| 44 | + $defaultConfig = DirectoryList::getDefaultConfig(); |
| 45 | + |
| 46 | + $this->assertArrayHasKey(DirectoryList::GENERATED, $defaultConfig); |
| 47 | + $this->assertArrayHasKey(DirectoryList::DI, $defaultConfig); |
| 48 | + $this->assertArrayHasKey(DirectoryList::GENERATION, $defaultConfig); |
| 49 | + $this->assertArrayHasKey(DirectoryList::ROOT, $defaultConfig); |
| 50 | + $this->assertArrayHasKey(DirectoryList::APP, $defaultConfig); |
| 51 | + $this->assertArrayHasKey(DirectoryList::CONFIG, $defaultConfig); |
| 52 | + $this->assertArrayHasKey(DirectoryList::LIB_INTERNAL, $defaultConfig); |
| 53 | + $this->assertArrayHasKey(DirectoryList::VAR_DIR, $defaultConfig); |
| 54 | + $this->assertArrayHasKey(DirectoryList::CACHE, $defaultConfig); |
| 55 | + $this->assertArrayHasKey(DirectoryList::LOG, $defaultConfig); |
| 56 | + $this->assertArrayHasKey(DirectoryList::SESSION, $defaultConfig); |
| 57 | + $this->assertArrayHasKey(DirectoryList::MEDIA, $defaultConfig); |
| 58 | + $this->assertArrayHasKey(DirectoryList::STATIC_VIEW, $defaultConfig); |
| 59 | + $this->assertArrayHasKey(DirectoryList::PUB, $defaultConfig); |
| 60 | + $this->assertArrayHasKey(DirectoryList::LIB_WEB, $defaultConfig); |
| 61 | + $this->assertArrayHasKey(DirectoryList::TMP, $defaultConfig); |
| 62 | + $this->assertArrayHasKey(DirectoryList::UPLOAD, $defaultConfig); |
| 63 | + $this->assertArrayHasKey(DirectoryList::TEMPLATE_MINIFICATION_DIR, $defaultConfig); |
| 64 | + $this->assertArrayHasKey(DirectoryList::TMP_MATERIALIZATION_DIR, $defaultConfig); |
| 65 | + $this->assertArrayHasKey(DirectoryList::SETUP, $defaultConfig); |
| 66 | + $this->assertArrayHasKey(DirectoryList::COMPOSER_HOME, $defaultConfig); |
78 | 67 | }
|
79 | 68 | }
|
0 commit comments