Skip to content

Commit c0b2e01

Browse files
author
Eugene Matvejev
authored
Merge pull request #60 from eugene-matvejev/update_test_fixtures
update test fixtures
2 parents b014a03 + 4a513b9 commit c0b2e01

File tree

8 files changed

+60
-271
lines changed

8 files changed

+60
-271
lines changed

tests/phpunit/Processor/ProcessorTest.php

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ protected function setUp()
2828
public function attachFiles()
2929
{
3030
$paths = [
31-
static::getSharedFixturesDirectory() . '/sass',
32-
static::getSharedFixturesDirectory() . '/compass'
31+
static::getSharedFixturesDirectory() . '/sass' => 1,
32+
static::getSharedFixturesDirectory() . '/compass' => 1,
33+
static::getSharedFixturesDirectory() . '/scss' => 3,
34+
static::getSharedFixturesDirectory() . '/scss/layout.scss' => 1
3335
];
34-
$cacheDir = dirname(dirname(__DIR__)) . '/var/cache';
35-
36-
foreach ($paths as $path) {
36+
foreach ($paths as $path => $expectedFiles) {
3737
$processor = new Processor($this->io);
38-
$processor->attachFiles($path, $cacheDir);
38+
$processor->attachFiles($path, '');
3939

40-
$this->assertCount(2, $processor->getFiles());
40+
$this->assertCount($expectedFiles, $processor->getFiles());
4141
}
4242
}
4343

@@ -49,13 +49,7 @@ public function attachFiles()
4949
*/
5050
public function attachFilesExpectedException()
5151
{
52-
$path = static::getSharedFixturesDirectory() . '/do-not-exists';
53-
$cacheDir = dirname(dirname(__DIR__)) . '/var/cache';
54-
55-
$processor = new Processor($this->io);
56-
$processor->attachFiles($path, $cacheDir);
57-
58-
$this->assertCount(2, $processor->getFiles());
52+
(new Processor($this->io))->attachFiles(static::getSharedFixturesDirectory() . '/do-not-exists', '');
5953
}
6054

6155
/**
@@ -64,7 +58,7 @@ public function attachFilesExpectedException()
6458
*/
6559
public function processFileSASS()
6660
{
67-
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/compass/sass/layout.scss', ''))
61+
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/scss/layout.scss', ''))
6862
->setSourceContentFromSourcePath();
6963

7064
(new Processor($this->io))->processFile($file);
@@ -80,7 +74,7 @@ public function processFileSASS()
8074
*/
8175
public function processFileExpectedException()
8276
{
83-
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/compass/sass/', ''))
77+
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/compass', ''))
8478
->setSourceContentFromSourcePath()
8579
->setType(FileContainer::TYPE_UNKNOWN);
8680

tests/shared-fixtures/compass/app.scss

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@import "compass/reset";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@import "../compass";
2+
@import "../scss/layout";
3+
@import "../sass/layout-loading-animation";
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.loading-animation
2+
position: relative
3+
width: 57px
4+
5+
span
6+
animation: loading-animation 1.5s infinite ease-in-out
7+
background: #9b59b6
8+
bottom: 0
9+
display: block
10+
height: 5px
11+
position: absolute
12+
width: 9px
13+
14+
&:nth-child(2)
15+
animation-delay: .2s
16+
left: 11px
17+
18+
&:nth-child(3)
19+
animation-delay: .4s
20+
left: 22px
21+
22+
&:nth-child(4)
23+
animation-delay: .6s
24+
left: 33px
25+
26+
&:nth-child(5)
27+
animation-delay: .8s
28+
left: 44px
29+
30+
@keyframes loading-animation
31+
0%
32+
height: 5px
33+
transform: translateY(0px)
34+
background: #9b59b6
35+
25%
36+
height: 30px
37+
transform: translateY(15px)
38+
background: #3498db
39+
50%
40+
height: 5px
41+
transform: translateY(0px)
42+
background: #9b59b6
43+
100%
44+
height: 5px
45+
transform: translateY(0px)
46+
background: #9b59b6

tests/shared-fixtures/sass/layout-loading-animation.scss

Lines changed: 0 additions & 58 deletions
This file was deleted.

tests/shared-fixtures/sass/layout.scss

Lines changed: 0 additions & 181 deletions
This file was deleted.

0 commit comments

Comments
 (0)