diff --git a/tests/TestCase/Shell/Task/AssetsTaskTest.php b/tests/TestCase/Shell/Task/AssetsTaskTest.php index b006ef22546..ffb7f7bb49f 100644 --- a/tests/TestCase/Shell/Task/AssetsTaskTest.php +++ b/tests/TestCase/Shell/Task/AssetsTaskTest.php @@ -216,21 +216,23 @@ public function testCopyOverwrite() $this->Task->copy(); + $pluginPath = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'webroot'; + $path = WWW_ROOT . 'test_plugin'; $dir = new \SplFileInfo($path); $this->assertTrue($dir->isDir()); $this->assertFileExists($path . DS . 'root.js'); - unlink($path . DS . 'root.js'); + file_put_contents($path . DS . 'root.js', 'updated'); $this->Task->copy(); - $this->assertFileNotExists($path . DS . 'root.js'); + $this->assertFileNotEquals($path . DS . 'root.js', $pluginPath . DS . 'root.js'); $this->Task->params['overwrite'] = true; $this->Task->copy(); - $this->assertFileExists($path . DS . 'root.js'); + $this->assertFileEquals($path . DS . 'root.js', $pluginPath . DS . 'root.js'); $folder = new Folder($path); $folder->delete();