Browse Source

update test

Andrej Griniuk 8 years ago
parent
commit
e6e673e680
1 changed files with 5 additions and 3 deletions
  1. 5 3
      tests/TestCase/Shell/Task/AssetsTaskTest.php

+ 5 - 3
tests/TestCase/Shell/Task/AssetsTaskTest.php

@@ -216,21 +216,23 @@ class AssetsTaskTest extends TestCase
 
         $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();