/** * @magentoConfigFixture current_store dev/js/merge_files 1 * @magentoAppIsolation enabled */ public function testCleanMergedJsCss() { $this->assertFileNotExists($this->_pubMerged); $this->_model->getOptimalJsUrls(array('calendar/calendar.js', 'scripts.js')); $this->assertFileExists($this->_pubMerged); $filesFound = false; foreach (new RecursiveDirectoryIterator($this->_pubMerged) as $fileInfo) { if ($fileInfo->isFile()) { $filesFound = true; } } $this->assertTrue($filesFound, 'No files found in the merged directory.'); $this->_model->cleanMergedJsCss(); $this->assertFileNotExists($this->_pubMerged); }
/** * @param array $files * @param array $expectedFiles * @dataProvider getOptimalJsUrlsMergedDataProvider * @magentoConfigFixture current_store dev/js/merge_files 1 */ public function testGetOptimalJsUrlsMerged($files, $expectedFiles) { $this->assertEquals($expectedFiles, $this->_model->getOptimalJsUrls($files)); }