Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
delboy1978uk committed Sep 29, 2019
1 parent f585770 commit 6b0faac
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 20 deletions.
17 changes: 0 additions & 17 deletions .gitignore
Expand Up @@ -2,23 +2,6 @@
composer.phar
vendor/

# Local configs
config/autoload/*.local.php

# Binary gettext files
*.mo

# Data
data/logs/
data/cache/
data/sessions/
data/tmp/
temp/

# Legacy ZF1
demos/
extras/documentation

#ide
.idea/

Expand Down
1 change: 1 addition & 0 deletions tests/_data/public/.gitignore
@@ -0,0 +1 @@
*
3 changes: 3 additions & 0 deletions tests/_data/some-module/assets/css/style.css
@@ -0,0 +1,3 @@
h1 {
color: blue;
}
Binary file added tests/_data/some-module/assets/img/me.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tests/_data/some-module/assets/js/test.js
@@ -0,0 +1 @@
alert('YES');
13 changes: 10 additions & 3 deletions tests/unit/Del/AssetManagerTest.php
Expand Up @@ -26,15 +26,22 @@ protected function _after()
{
// unset the blank class after each test
unset($this->booty);
unlink('tests/_data/public/assets/js/test.js');
unlink('tests/_data/public/assets/img/me.jpg');
unlink('tests/_data/public/assets/css/style.css');
}

/**
* Check tests are working
*/
public function testBlah()
{
$this->assertEquals('Ready to start building tests', $this->booty->blah());
$am = $this->booty;
$am->addAssetsFolder('tests/_data/some-module/assets/');
$am->setDestinationFolder('tests/_data/public/assets/');
$am->deployAssets();
$this->assertFileExists('tests/_data/public/assets/js/test.js');
$this->assertFileExists('tests/_data/public/assets/img/me.jpg');
$this->assertFileExists('tests/_data/public/assets/css/style.css');
}


}

0 comments on commit 6b0faac

Please sign in to comment.