Browse Source

test to fix for DS issues on windows

euromark 12 years ago
parent
commit
5525c025d4

+ 1 - 1
src/Console/Command/Task/FixtureTask.php

@@ -52,7 +52,7 @@ class FixtureTask extends BakeTask {
  */
 	public function __construct(ConsoleOutput $stdout = null, ConsoleOutput $stderr = null, ConsoleInput $stdin = null) {
 		parent::__construct($stdout, $stderr, $stdin);
-		$this->path = ROOT . '/Test/Fixture/';
+		$this->path = ROOT . DS . 'Test' . DS . 'Fixture' . DS;
 	}
 
 /**

+ 3 - 3
src/Console/Command/Task/ModelTask.php

@@ -76,7 +76,7 @@ class ModelTask extends BakeTask {
  * @return void
  */
 	public function initialize() {
-		$this->path = APP . '/Model/';
+		$this->path = APP . 'Model' . DS;
 	}
 
 /**
@@ -538,7 +538,7 @@ class ModelTask extends BakeTask {
 		$out = $this->Template->generate('classes', 'entity');
 
 		$path = $this->getPath();
-		$filename = $path . 'Entity/' . $name . '.php';
+		$filename = $path . 'Entity' . DS . $name . '.php';
 		$this->out("\n" . __d('cake_console', 'Baking entity class for %s...', $name), 1, Shell::QUIET);
 		$this->createFile($filename, $out);
 		return $out;
@@ -581,7 +581,7 @@ class ModelTask extends BakeTask {
 		$out = $this->Template->generate('classes', 'table');
 
 		$path = $this->getPath();
-		$filename = $path . 'Table/' . $name . 'Table.php';
+		$filename = $path . 'Table' . DS . $name . 'Table.php';
 		$this->out("\n" . __d('cake_console', 'Baking table class for %s...', $name), 1, Shell::QUIET);
 		$this->createFile($filename, $out);
 		TableRegistry::clear();

+ 3 - 3
src/Console/Command/Task/PluginTask.php

@@ -55,7 +55,7 @@ class PluginTask extends Shell {
  */
 	public function initialize() {
 		$this->path = current(App::path('Plugin'));
-		$this->bootstrap = APP . 'Config/bootstrap.php';
+		$this->bootstrap = APP . 'Config' . DS . 'bootstrap.php';
 	}
 
 /**
@@ -156,7 +156,7 @@ class PluginTask extends Shell {
 			$out .= "use App\\Controller\\AppController;\n\n";
 			$out .= "class {$plugin}AppController extends AppController {\n\n";
 			$out .= "}\n";
-			$this->createFile($this->path . $plugin . DS . 'Controller/' . $controllerFileName, $out);
+			$this->createFile($this->path . $plugin . DS . 'Controller' . DS . $controllerFileName, $out);
 
 			$this->_modifyBootstrap($plugin);
 			$this->_generatePhpunitXml($plugin, $this->path);
@@ -218,7 +218,7 @@ class PluginTask extends Shell {
 		]);
 		$this->out( __d('cake_console', 'Generating Test/bootstrap.php file...'));
 		$out = $this->Template->generate('test', 'bootstrap');
-		$file = $path . $plugin . '/Test/bootstrap.php';
+		$file = $path . $plugin . DS . 'Test' . DS . 'bootstrap.php';
 		$this->createFile($file, $out);
 	}
 

+ 2 - 1
src/Console/Shell.php

@@ -705,7 +705,8 @@ class Shell extends Object {
 	public function shortPath($file) {
 		$shortPath = str_replace(ROOT, null, $file);
 		$shortPath = str_replace('..' . DS, '', $shortPath);
-		return str_replace(DS . DS, DS, $shortPath);
+		$shortPath = str_replace(DS, '/', $shortPath);
+		return str_replace('//', DS, $shortPath);
 	}
 
 /**

+ 1 - 1
tests/TestCase/Console/Command/Task/ControllerTaskTest.php

@@ -189,7 +189,7 @@ class ControllerTaskTest extends TestCase {
 	public function testBakePrefixed() {
 		$this->Task->params['prefix'] = 'Admin';
 
-		$filename = '/my/path/Admin/BakeArticlesController.php';
+		$filename = str_replace('/', DS, '/my/path/Admin/BakeArticlesController.php');
 		$this->Task->expects($this->at(1))
 			->method('createFile')
 			->with($filename, $this->anything());

+ 3 - 2
tests/TestCase/Console/Command/Task/FixtureTaskTest.php

@@ -77,7 +77,7 @@ class FixtureTaskTest extends TestCase {
 		$in = $this->getMock('Cake\Console\ConsoleInput', array(), array(), '', false);
 
 		$Task = new FixtureTask($out, $out, $in);
-		$this->assertEquals(ROOT . '/Test/Fixture/', $Task->path);
+		$this->assertEquals(ROOT . DS . 'Test' . DS . 'Fixture' . DS, $Task->path);
 	}
 
 /**
@@ -396,9 +396,10 @@ class FixtureTaskTest extends TestCase {
  */
 	public function testGeneratePluginFixtureFile() {
 		$this->Task->connection = 'test';
-		$this->Task->path = '/my/path/';
+		$this->Task->path = str_replace('/', DS, '/my/path/');
 		$this->Task->plugin = 'TestPlugin';
 		$filename = TEST_APP . 'Plugin/TestPlugin/Test/Fixture/ArticleFixture.php';
+		$filename = str_replace('/', DS, $filename);
 
 		Plugin::load('TestPlugin');
 		$this->Task->expects($this->at(0))->method('createFile')

+ 28 - 27
tests/TestCase/Console/Command/Task/ModelTaskTest.php

@@ -561,7 +561,7 @@ class ModelTaskTest extends TestCase {
 	}
 
 /**
- * test baking 
+ * test baking
  *
  * @return void
  */
@@ -687,8 +687,9 @@ class ModelTaskTest extends TestCase {
 		$this->Task->plugin = 'ControllerTest';
 
 		// fake plugin path
-		Plugin::load('ControllerTest', array('path' => APP . 'Plugin/ControllerTest/'));
+		Plugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
 		$path = APP . 'Plugin/ControllerTest/Model/Table/BakeArticlesTable.php';
+		$path = str_replace('/', DS, $path);
 		$this->Task->expects($this->once())->method('createFile')
 			->with($path, $this->logicalAnd(
 				$this->stringContains('namespace ControllerTest\\Model\\Table;'),
@@ -709,8 +710,8 @@ class ModelTaskTest extends TestCase {
 		$this->Task->plugin = 'ControllerTest';
 
 		// fake plugin path
-		Plugin::load('ControllerTest', array('path' => APP . 'Plugin/ControllerTest/'));
-		$path = APP . 'Plugin/ControllerTest/Model/Entity/BakeArticle.php';
+		Plugin::load('ControllerTest', array('path' => APP . 'Plugin' . DS . 'ControllerTest' . DS));
+		$path = APP . 'Plugin' . DS . 'ControllerTest' . DS . 'Model' . DS . 'Entity' . DS . 'BakeArticle.php';
 		$this->Task->expects($this->once())->method('createFile')
 			->with($path, $this->logicalAnd(
 				$this->stringContains('namespace ControllerTest\\Model\\Entity;'),
@@ -746,15 +747,15 @@ class ModelTaskTest extends TestCase {
  */
 	public function testExecuteWithNamedModel() {
 		$this->Task->connection = 'test';
-		$this->Task->path = '/my/path/';
+		$this->Task->path = str_replace('/', DS, '/my/path/');
 		$this->Task->args = ['BakeArticles'];
 
-		$tableFile = '/my/path/Table/BakeArticlesTable.php';
+		$tableFile = str_replace('/', DS, '/my/path/Table/BakeArticlesTable.php');
 		$this->Task->expects($this->at(0))
 			->method('createFile')
 			->with($tableFile, $this->stringContains('class BakeArticlesTable extends Table'));
 
-		$entityFile = '/my/path/Entity/BakeArticle.php';
+		$entityFile = str_replace('/', DS, '/my/path/Entity/BakeArticle.php');
 		$this->Task->expects($this->at(1))
 			->method('createFile')
 			->with($entityFile, $this->stringContains('class BakeArticle extends Entity'));
@@ -781,10 +782,10 @@ class ModelTaskTest extends TestCase {
  */
 	public function testExecuteWithNamedModelVariations($name) {
 		$this->Task->connection = 'test';
-		$this->Task->path = '/my/path/';
+		$this->Task->path = str_replace('/', DS, '/my/path/');
 
 		$this->Task->args = array($name);
-		$filename = '/my/path/Table/BakeArticlesTable.php';
+		$filename = str_replace('/', DS, '/my/path/Table/BakeArticlesTable.php');
 
 		$this->Task->expects($this->at(0))
 			->method('createFile')
@@ -804,7 +805,7 @@ class ModelTaskTest extends TestCase {
 		}
 
 		$this->Task->connection = 'test';
-		$this->Task->path = '/my/path/';
+		$this->Task->path = str_replace('/', DS, '/my/path/');
 		$this->Task->args = ['all'];
 
 		$this->Task->Fixture->expects($this->exactly($count))
@@ -812,52 +813,52 @@ class ModelTaskTest extends TestCase {
 		$this->Task->Test->expects($this->exactly($count))
 			->method('bake');
 
-		$filename = '/my/path/Table/BakeArticlesTable.php';
+		$filename = str_replace('/', DS, '/my/path/Table/BakeArticlesTable.php');
 		$this->Task->expects($this->at(0))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeArticlesTable extends'));
 
-		$filename = '/my/path/Entity/BakeArticle.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeArticle.php');
 		$this->Task->expects($this->at(1))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeArticle extends'));
 
-		$filename = '/my/path/Table/BakeArticlesBakeTagsTable.php';
+		$filename = str_replace('/', DS, '/my/path/Table/BakeArticlesBakeTagsTable.php');
 		$this->Task->expects($this->at(2))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeArticlesBakeTagsTable extends'));
 
-		$filename = '/my/path/Entity/BakeArticlesBakeTag.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeArticlesBakeTag.php');
 		$this->Task->expects($this->at(3))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeArticlesBakeTag extends'));
 
-		$filename = '/my/path/Table/BakeCommentsTable.php';
+		$filename = str_replace('/', DS, '/my/path/Table/BakeCommentsTable.php');
 		$this->Task->expects($this->at(4))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeCommentsTable extends'));
 
-		$filename = '/my/path/Entity/BakeComment.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeComment.php');
 		$this->Task->expects($this->at(5))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeComment extends'));
 
-		$filename = '/my/path/Table/BakeTagsTable.php';
+		$filename = str_replace('/', DS, '/my/path/Table/BakeTagsTable.php');
 		$this->Task->expects($this->at(6))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeTagsTable extends'));
 
-		$filename = '/my/path/Entity/BakeTag.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeTag.php');
 		$this->Task->expects($this->at(7))
 			->method('createFile')
 			->with($filename, $this->stringContains('class BakeTag extends'));
 
-		$filename = '/my/path/Table/CategoryThreadsTable.php';
+		$filename = str_replace('/', DS, '/my/path/Table/CategoryThreadsTable.php');
 		$this->Task->expects($this->at(8))
 			->method('createFile')
 			->with($filename, $this->stringContains('class CategoryThreadsTable extends'));
 
-		$filename = '/my/path/Entity/CategoryThread.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/CategoryThread.php');
 		$this->Task->expects($this->at(9))
 			->method('createFile')
 			->with($filename, $this->stringContains('class CategoryThread extends'));
@@ -877,7 +878,7 @@ class ModelTaskTest extends TestCase {
 		}
 
 		$this->Task->connection = 'test';
-		$this->Task->path = '/my/path/';
+		$this->Task->path = str_replace('/', DS, '/my/path/');
 		$this->Task->args = ['all'];
 		$this->Task->skipTables = ['bake_tags'];
 
@@ -886,32 +887,32 @@ class ModelTaskTest extends TestCase {
 		$this->Task->Test->expects($this->exactly(7))
 			->method('bake');
 
-		$filename = '/my/path/Entity/BakeArticle.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeArticle.php');
 		$this->Task->expects($this->at(1))
 			->method('createFile')
 			->with($filename);
 
-		$filename = '/my/path/Entity/BakeArticlesBakeTag.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeArticlesBakeTag.php');
 		$this->Task->expects($this->at(3))
 			->method('createFile')
 			->with($filename);
 
-		$filename = '/my/path/Entity/BakeComment.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/BakeComment.php');
 		$this->Task->expects($this->at(5))
 			->method('createFile')
 			->with($filename);
 
-		$filename = '/my/path/Entity/CategoryThread.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/CategoryThread.php');
 		$this->Task->expects($this->at(7))
 			->method('createFile')
 			->with($filename);
 
-		$filename = '/my/path/Entity/CounterCacheUser.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/CounterCacheUser.php');
 		$this->Task->expects($this->at(9))
 			->method('createFile')
 			->with($filename);
 
-		$filename = '/my/path/Entity/NumberTree.php';
+		$filename = str_replace('/', DS, '/my/path/Entity/NumberTree.php');
 		$this->Task->expects($this->at(11))
 			->method('createFile')
 			->with($filename);

+ 10 - 10
tests/TestCase/Console/Command/Task/PluginTaskTest.php

@@ -42,8 +42,8 @@ class PluginTaskTest extends TestCase {
 		);
 		$this->Task->Template = new TemplateTask($this->out, $this->out, $this->in);
 
-		$this->Task->path = TMP . 'tests/';
-		$this->Task->bootstrap = TMP . 'tests/bootstrap.php';
+		$this->Task->path = TMP . 'tests' . DS;
+		$this->Task->bootstrap = TMP . 'tests' . DS . 'bootstrap.php';
 
 		if (!is_dir($this->Task->path)) {
 			mkdir($this->Task->path);
@@ -75,7 +75,7 @@ class PluginTaskTest extends TestCase {
 
 		$path = $this->Task->path . 'BakeTestPlugin';
 
-		$file = $path . '/Controller/BakeTestPluginAppController.php';
+		$file = $path . DS . 'Controller' . DS . 'BakeTestPluginAppController.php';
 		$this->Task->expects($this->at(1))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
@@ -123,16 +123,16 @@ class PluginTaskTest extends TestCase {
 			->will($this->returnValue('y'));
 
 		$path = $this->Task->path . 'TestPlugin';
-		$file = $path . '/Controller/TestPluginAppController.php';
+		$file = $path . DS . 'Controller' . DS . 'TestPluginAppController.php';
 
 		$this->Task->expects($this->at(2))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
-		$file = $path . '/phpunit.xml';
+		$file = $path . DS . 'phpunit.xml';
 		$this->Task->expects($this->at(3))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
-		$file = $path . '/Test/bootstrap.php';
+		$file = $path . DS . 'Test' . DS . 'bootstrap.php';
 		$this->Task->expects($this->at(4))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
@@ -153,15 +153,15 @@ class PluginTaskTest extends TestCase {
 			->will($this->returnValue('y'));
 
 		$path = $this->Task->path . 'BakeTestPlugin';
-		$file = $path . DS . 'Controller/BakeTestPluginAppController.php';
+		$file = $path . DS . 'Controller' . DS . 'BakeTestPluginAppController.php';
 		$this->Task->expects($this->at(1))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
-		$file = $path . '/phpunit.xml';
+		$file = $path . DS . 'phpunit.xml';
 		$this->Task->expects($this->at(2))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
-		$file = $path . '/Test/bootstrap.php';
+		$file = $path . DS. 'Test' . DS . 'bootstrap.php';
 		$this->Task->expects($this->at(3))->method('createFile')
 			->with($file, new \PHPUnit_Framework_Constraint_IsAnything());
 
@@ -188,7 +188,7 @@ class PluginTaskTest extends TestCase {
 			array('in', 'out', 'err', 'createFile', '_stop'),
 			array($this->out, $this->out, $this->in)
 		);
-		$this->Task->path = TMP . 'tests/';
+		$this->Task->path = TMP . 'tests' . DS;
 
 		// Make sure the added path is filtered out.
 		$this->Task->expects($this->exactly($last))

+ 2 - 2
tests/TestCase/Console/Command/Task/TemplateTaskTest.php

@@ -55,9 +55,9 @@ class TemplateTaskTest extends TestCase {
  * @return void
  */
 	public function testFindingInstalledThemesForBake() {
-		$consoleLibs = CAKE . 'Console/';
+		$consoleLibs = CAKE . 'Console' . DS;
 		$this->Task->initialize();
-		$this->assertEquals($this->Task->templatePaths['default'], $consoleLibs . 'Templates/default/');
+		$this->assertPathEquals($this->Task->templatePaths['default'], $consoleLibs . 'Templates/default/');
 	}
 
 /**

+ 5 - 4
tests/TestCase/Console/Command/Task/TestTaskTest.php

@@ -136,7 +136,7 @@ class TestTaskTest extends TestCase {
 		$this->Task->args = ['Table', 'TestTaskTag'];
 		$this->Task->expects($this->once())->method('createFile')
 			->with(
-				$this->stringContains('TestCase/Model/Table/TestTaskTagTableTest.php'),
+				$this->stringContains('TestCase' . DS . 'Model' . DS . 'Table' . DS . 'TestTaskTagTableTest.php'),
 				$this->stringContains('class TestTaskTagTableTest extends TestCase')
 			);
 		$this->Task->execute();
@@ -382,7 +382,7 @@ class TestTaskTest extends TestCase {
 
 		$this->Task->expects($this->once())
 			->method('createFile')
-			->with($this->stringContains('Controller/Admin/PostsControllerTest.php'))
+			->with($this->stringContains('Controller' . DS . 'Admin' . DS . 'PostsControllerTest.php'))
 			->will($this->returnValue(true));
 
 		$result = $this->Task->bake('controller', 'Admin\Posts');
@@ -554,6 +554,7 @@ class TestTaskTest extends TestCase {
 
 		Plugin::load('TestPlugin');
 		$path = TEST_APP . 'Plugin/TestPlugin/Test/TestCase/View/Helper/FormHelperTest.php';
+		$path = str_replace('/', DS, $path);
 		$this->Task->expects($this->once())->method('createFile')
 			->with($path, $this->anything());
 
@@ -594,7 +595,7 @@ class TestTaskTest extends TestCase {
 
 		$result = $this->Task->testCaseFileName($type, $class);
 		$expected = $this->Task->path . $expected;
-		$this->assertEquals($expected, $result);
+		$this->assertPathEquals($expected, $result);
 	}
 
 /**
@@ -611,7 +612,7 @@ class TestTaskTest extends TestCase {
 		$result = $this->Task->testCaseFileName('entity', $class);
 
 		$expected = TEST_APP . 'Plugin/TestPlugin/Test/TestCase/Model/Entity/PostTest.php';
-		$this->assertEquals($expected, $result);
+		$this->assertPathEquals($expected, $result);
 	}
 
 /**

+ 13 - 13
tests/TestCase/Console/Command/Task/ViewTaskTest.php

@@ -231,11 +231,11 @@ class ViewTaskTest extends TestCase {
 		$this->Task->path = '/path/Template/';
 
 		$result = $this->Task->getPath();
-		$this->assertEquals('/path/Template/Posts/', $result);
+		$this->assertPathEquals('/path/Template/Posts/', $result);
 
 		$this->Task->params['prefix'] = 'admin';
 		$result = $this->Task->getPath();
-		$this->assertEquals('/path/Template/Admin/Posts/', $result);
+		$this->assertPathEquals('/path/Template/Admin/Posts/', $result);
 	}
 
 /**
@@ -252,11 +252,11 @@ class ViewTaskTest extends TestCase {
 
 		$this->Task->params['plugin'] = $this->Task->plugin = 'TestPlugin';
 		$result = $this->Task->getPath();
-		$this->assertEquals($pluginPath . 'Template/Posts/', $result);
+		$this->assertPathEquals($pluginPath . 'Template/Posts/', $result);
 
 		$this->Task->params['prefix'] = 'admin';
 		$result = $this->Task->getPath();
-		$this->assertEquals($pluginPath . 'Template/Admin/Posts/', $result);
+		$this->assertPathEquals($pluginPath . 'Template/Admin/Posts/', $result);
 
 		Plugin::unload('TestPlugin');
 	}
@@ -342,7 +342,7 @@ class ViewTaskTest extends TestCase {
 		$this->Task->expects($this->at(0))
 			->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/view.ctp',
+				TMP . 'ViewTaskComments' . DS . 'view.ctp',
 				$this->stringContains('View Task Comments')
 			);
 
@@ -361,7 +361,7 @@ class ViewTaskTest extends TestCase {
 
 		$this->Task->expects($this->at(0))->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/edit.ctp',
+				TMP . 'ViewTaskComments' . DS . 'edit.ctp',
 				$this->anything()
 			);
 		$result = $this->Task->bake('edit', true);
@@ -382,7 +382,7 @@ class ViewTaskTest extends TestCase {
 
 		$this->Task->expects($this->at(0))->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/index.ctp',
+				TMP . 'ViewTaskComments' . DS . 'index.ctp',
 				$this->stringContains("\$viewTaskComment->article->title")
 			);
 		$this->Task->bake('index', true);
@@ -415,17 +415,17 @@ class ViewTaskTest extends TestCase {
 		$this->Task->expects($this->at(0))
 			->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/view.ctp',
+				TMP . 'ViewTaskComments' . DS . 'view.ctp',
 				$this->stringContains('View Task Comments')
 			);
 		$this->Task->expects($this->at(1))->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/edit.ctp',
+				TMP . 'ViewTaskComments' . DS . 'edit.ctp',
 				$this->stringContains('Edit View Task Comment')
 			);
 		$this->Task->expects($this->at(2))->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/index.ctp',
+				TMP . 'ViewTaskComments' . DS . 'index.ctp',
 				$this->stringContains('ViewTaskComment')
 			);
 
@@ -447,7 +447,7 @@ class ViewTaskTest extends TestCase {
 
 		$this->Task->expects($this->once())->method('createFile')
 			->with(
-				TMP . 'ViewTaskComments/my_action.ctp',
+				TMP . 'ViewTaskComments' . DS . 'my_action.ctp',
 				$this->anything()
 			);
 
@@ -580,7 +580,7 @@ class ViewTaskTest extends TestCase {
 		foreach ($views as $i => $view) {
 			$this->Task->expects($this->at($i))->method('createFile')
 				->with(
-					TMP . 'Blog/' . $view,
+					TMP . 'Blog' . DS . $view,
 					$this->anything()
 				);
 		}
@@ -603,7 +603,7 @@ class ViewTaskTest extends TestCase {
 		foreach ($views as $i => $view) {
 			$this->Task->expects($this->at($i))->method('createFile')
 				->with(
-					TMP . 'Admin/Posts/' . $view,
+					TMP . 'Admin' . DS . 'Posts' . DS . $view,
 					$this->anything()
 				);
 		}

+ 6 - 6
tests/TestCase/Console/ShellTest.php

@@ -499,25 +499,25 @@ class ShellTest extends TestCase {
  */
 	public function testShortPath() {
 		$path = $expected = DS . 'tmp/ab/cd';
-		$this->assertEquals($expected, $this->Shell->shortPath($path));
+		$this->assertPathEquals($expected, $this->Shell->shortPath($path));
 
 		$path = $expected = DS . 'tmp/ab/cd/';
-		$this->assertEquals($expected, $this->Shell->shortPath($path));
+		$this->assertPathEquals($expected, $this->Shell->shortPath($path));
 
 		$path = $expected = DS . 'tmp/ab/index.php';
-		$this->assertEquals($expected, $this->Shell->shortPath($path));
+		$this->assertPathEquals($expected, $this->Shell->shortPath($path));
 
 		$path = DS . 'tmp/ab/' . DS . 'cd';
 		$expected = DS . 'tmp/ab/cd';
-		$this->assertEquals($expected, $this->Shell->shortPath($path));
+		$this->assertPathEquals($expected, $this->Shell->shortPath($path));
 
 		$path = 'tmp/ab';
 		$expected = 'tmp/ab';
-		$this->assertEquals($expected, $this->Shell->shortPath($path));
+		$this->assertPathEquals($expected, $this->Shell->shortPath($path));
 
 		$path = 'tmp/ab';
 		$expected = 'tmp/ab';
-		$this->assertEquals($expected, $this->Shell->shortPath($path));
+		$this->assertPathEquals($expected, $this->Shell->shortPath($path));
 
 		$path = APP;
 		$result = $this->Shell->shortPath($path);