Skip to content

Commit

Permalink
Test for case when directory for plugin assets already exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 20, 2014
1 parent 8f381de commit 1ec5fe0
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/TestCase/Shell/PluginAssetsShellTest.php
Expand Up @@ -100,6 +100,27 @@ public function testSymlinkWhenVendorDirectoryExits() {
$folder->delete();
}

/**
* testSymlinkWhenTargetAlreadyExits
*
* @return void
*/
public function testSymlinkWhenTargetAlreadyExits() {
Plugin::load('TestTheme');

$shell = $this->getMock(
'Cake\Shell\PluginAssetsShell',
array('in', 'out', 'err', '_stop', '_createSymlink', '_copyDirectory'),
array($this->io)
);

$this->assertTrue(is_dir(WWW_ROOT . 'test_theme'));

$shell->expects($this->never())->method('_createSymlink');
$shell->expects($this->never())->method('_copyDirectory');
$shell->symlink();
}

/**
* test that plugins without webroot are not processed
*
Expand Down

0 comments on commit 1ec5fe0

Please sign in to comment.