Skip to content

Commit

Permalink
Remove mobile.css from unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kijin committed Aug 5, 2018
1 parent 6d77e86 commit 4fc7605
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/unit/classes/FrontEndFileHandlerTest.php
Expand Up @@ -38,17 +38,13 @@ public function testFrontEndFileHandler()
$this->assertEquals($expected, $handler->getJsFileList('body'));
});

$this->specify("css and scss", function() {
$this->specify("css and less", function() {
$handler = new FrontEndFileHandler();
$handler->loadFile(array('./common/css/rhymix.less'));
$handler->loadFile(array('./common/css/mobile.css'));
$result = $handler->getCssFileList(true);
$this->assertRegexp('/\.rhymix\.less\.css\?\d+$/', $result[0]['file']);
$this->assertEquals('all', $result[0]['media']);
$this->assertEmpty($result[0]['targetie']);
$this->assertEquals('/rhymix/common/css/mobile.css' . $this->_filemtime('common/css/mobile.css'), $result[1]['file']);
$this->assertEquals('all', $result[1]['media']);
$this->assertEmpty($result[1]['targetie']);
});

$this->specify("order (duplicate)", function() {
Expand Down Expand Up @@ -157,14 +153,10 @@ public function testFrontEndFileHandler()
$this->specify("minify (css)", function() {
$handler = new FrontEndFileHandler();
$handler->loadFile(array('./common/css/rhymix.less'));
$handler->loadFile(array('./common/css/mobile.css'));
$result = $handler->getCssFileList(true);
$this->assertRegexp('/\.rhymix\.less\.min\.css\b/', $result[0]['file']);
$this->assertEquals('all', $result[0]['media']);
$this->assertEmpty($result[0]['targetie']);
$this->assertRegexp('/minified\/common\.css\.mobile\.min\.css\?\d+$/', $result[1]['file']);
$this->assertEquals('all', $result[1]['media']);
$this->assertEmpty($result[1]['targetie']);
});

$this->specify("minify (js)", function() {
Expand All @@ -182,7 +174,7 @@ public function testFrontEndFileHandler()
$this->specify("concat (css)", function() {
$handler = new FrontEndFileHandler();
$handler->loadFile(array('./common/css/rhymix.less'));
$handler->loadFile(array('./common/css/mobile.css'));
$handler->loadFile(array('./common/css/bootstrap-responsive.css'));
$handler->loadFile(array('http://external.host/style.css'));
$handler->loadFile(array('./common/css/bootstrap.css', null, 'IE'));
$handler->loadFile(array('./tests/_data/formatter/concat.source1.css'));
Expand Down Expand Up @@ -257,7 +249,6 @@ public function testFrontEndFileHandler()

$this->specify("blocked scripts", function() {
$handler = new FrontEndFileHandler();
$handler->loadFile(array('./common/css/mobile.css'));
$handler->loadFile(array('./common/css/xe.min.css'));
$handler->loadFile(array('./common/js/common.js'));
$handler->loadFile(array('./common/js/xe.js'));
Expand Down

0 comments on commit 4fc7605

Please sign in to comment.