Browse Source

Merge pull request #256 from majna/2.0-extract-test

Fixing failing i18n ExtractTask tests on Windows.
José Lorenzo Rodríguez 14 years ago
parent
commit
beac58188c
1 changed files with 6 additions and 6 deletions
  1. 6 6
      lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php

+ 6 - 6
lib/Cake/Test/Case/Console/Command/Task/ExtractTaskTest.php

@@ -284,10 +284,10 @@ class ExtractTaskTest extends CakeTestCase {
 		$this->Task->execute();
 		$result = file_get_contents($this->path . DS . 'default.pot');
 
-		$pattern = '#Model/PersisterOne.php:validation for field title#';
+		$pattern = preg_quote('#Model' . DS . 'PersisterOne.php:validation for field title#', '\\');
 		$this->assertPattern($pattern, $result);
 
-		$pattern = '#Model/PersisterOne.php:validation for field body#';
+		$pattern = preg_quote('#Model' . DS . 'PersisterOne.php:validation for field body#', '\\');
 		$this->assertPattern($pattern, $result);
 
 		$pattern = '#msgid "Post title is required"#';
@@ -329,10 +329,10 @@ class ExtractTaskTest extends CakeTestCase {
 		$this->Task->execute();
 		$result = file_get_contents($this->path . DS . 'test_plugin.pot');
 
-		$pattern = '#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field title#';
+		$pattern = preg_quote('#Plugin' . DS. 'TestPlugin' . DS. 'Model' . DS. 'TestPluginPost.php:validation for field title#', '\\');
 		$this->assertPattern($pattern, $result);
 
-		$pattern = '#Plugin/TestPlugin/Model/TestPluginPost.php:validation for field body#';
+		$pattern = preg_quote('#Plugin' . DS. 'TestPlugin' . DS. 'Model' . DS. 'TestPluginPost.php:validation for field body#', '\\');
 		$this->assertPattern($pattern, $result);
 
 		$pattern = '#msgid "Post title is required"#';
@@ -369,10 +369,10 @@ class ExtractTaskTest extends CakeTestCase {
 		$this->Task->execute();
 		$result = file_get_contents($this->path . DS . 'test_plugin.pot');
 
-		$pattern = '#Model/TestPluginPost.php:validation for field title#';
+		$pattern =  preg_quote('#Model' . DS. 'TestPluginPost.php:validation for field title#', '\\');
 		$this->assertPattern($pattern, $result);
 
-		$pattern = '#Model/TestPluginPost.php:validation for field body#';
+		$pattern =  preg_quote('#Model' . DS. 'TestPluginPost.php:validation for field body#', '\\');
 		$this->assertPattern($pattern, $result);
 
 		$pattern = '#msgid "Post title is required"#';