Skip to content

update test fixtures #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions tests/phpunit/Processor/ProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,16 @@ protected function setUp()
public function attachFiles()
{
$paths = [
static::getSharedFixturesDirectory() . '/sass',
static::getSharedFixturesDirectory() . '/compass'
static::getSharedFixturesDirectory() . '/sass' => 1,
static::getSharedFixturesDirectory() . '/compass' => 1,
static::getSharedFixturesDirectory() . '/scss' => 3,
static::getSharedFixturesDirectory() . '/scss/layout.scss' => 1
];
$cacheDir = dirname(dirname(__DIR__)) . '/var/cache';

foreach ($paths as $path) {
foreach ($paths as $path => $expectedFiles) {
$processor = new Processor($this->io);
$processor->attachFiles($path, $cacheDir);
$processor->attachFiles($path, '');

$this->assertCount(2, $processor->getFiles());
$this->assertCount($expectedFiles, $processor->getFiles());
}
}

Expand All @@ -49,13 +49,7 @@ public function attachFiles()
*/
public function attachFilesExpectedException()
{
$path = static::getSharedFixturesDirectory() . '/do-not-exists';
$cacheDir = dirname(dirname(__DIR__)) . '/var/cache';

$processor = new Processor($this->io);
$processor->attachFiles($path, $cacheDir);

$this->assertCount(2, $processor->getFiles());
(new Processor($this->io))->attachFiles(static::getSharedFixturesDirectory() . '/do-not-exists', '');
}

/**
Expand All @@ -64,7 +58,7 @@ public function attachFilesExpectedException()
*/
public function processFileSASS()
{
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/compass/sass/layout.scss', ''))
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/scss/layout.scss', ''))
->setSourceContentFromSourcePath();

(new Processor($this->io))->processFile($file);
Expand All @@ -80,7 +74,7 @@ public function processFileSASS()
*/
public function processFileExpectedException()
{
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/compass/sass/', ''))
$file = (new FileContainer(static::getSharedFixturesDirectory() . '/compass', ''))
->setSourceContentFromSourcePath()
->setType(FileContainer::TYPE_UNKNOWN);

Expand Down
16 changes: 0 additions & 16 deletions tests/shared-fixtures/compass/app.scss

This file was deleted.

1 change: 1 addition & 0 deletions tests/shared-fixtures/compass/compass.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "compass/reset";
3 changes: 3 additions & 0 deletions tests/shared-fixtures/integration/app.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "../compass";
@import "../scss/layout";
@import "../sass/layout-loading-animation";
46 changes: 46 additions & 0 deletions tests/shared-fixtures/sass/layout-loading-animation.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.loading-animation
position: relative
width: 57px

span
animation: loading-animation 1.5s infinite ease-in-out
background: #9b59b6
bottom: 0
display: block
height: 5px
position: absolute
width: 9px

&:nth-child(2)
animation-delay: .2s
left: 11px

&:nth-child(3)
animation-delay: .4s
left: 22px

&:nth-child(4)
animation-delay: .6s
left: 33px

&:nth-child(5)
animation-delay: .8s
left: 44px

@keyframes loading-animation
0%
height: 5px
transform: translateY(0px)
background: #9b59b6
25%
height: 30px
transform: translateY(15px)
background: #3498db
50%
height: 5px
transform: translateY(0px)
background: #9b59b6
100%
height: 5px
transform: translateY(0px)
background: #9b59b6
58 changes: 0 additions & 58 deletions tests/shared-fixtures/sass/layout-loading-animation.scss

This file was deleted.

181 changes: 0 additions & 181 deletions tests/shared-fixtures/sass/layout.scss

This file was deleted.