From ac0ec44f513e5467333b8347e3d514f6c500d705 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Mon, 21 Mar 2011 01:26:07 -0430 Subject: [PATCH] Fixing some extract console tests --- .../tests/cases/console/shells/tasks/extract.test.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Cake/tests/cases/console/shells/tasks/extract.test.php b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php index 333aae290..a4409225b 100644 --- a/lib/Cake/tests/cases/console/shells/tasks/extract.test.php +++ b/lib/Cake/tests/cases/console/shells/tasks/extract.test.php @@ -112,10 +112,13 @@ class ExtractTaskTest extends CakeTestCase { $this->assertPattern($pattern, $result); $pattern = '/msgid "Editing this Page"\nmsgstr ""\n/'; $this->assertPattern($pattern, $result); - $pattern = '/msgid "To change the content of this page, edit: %s.*To change its layout, '; - $pattern .= 'edit: %s.*You can also add some CSS styles for your pages at: %s"\nmsgstr ""/s'; + $pattern = '/msgid "To change the content of this page, create: APP\/views\/pages\/home\.ctp/'; $this->assertPattern($pattern, $result); + $pattern = '/To change its layout, create: APP\/views\/layouts\/default\.ctp\./s'; + $this->assertPattern($pattern, $result); + + // extract.ctp $pattern = '/\#: (\\\\|\/)extract\.ctp:6\n'; $pattern .= 'msgid "You have %d new message."\nmsgid_plural "You have %d new messages."/'; @@ -126,10 +129,12 @@ class ExtractTaskTest extends CakeTestCase { $this->assertPattern($pattern, $result); $pattern = '/\#: (\\\\|\/)extract\.ctp:14\n'; - $pattern .= '\#: (\\\\|\/)home\.ctp:66\n'; + $pattern .= '\#: (\\\\|\/)home\.ctp:99\n'; $pattern .= 'msgid "Editing this Page"\nmsgstr ""/'; + $this->assertPattern($pattern, $result); + // extract.ctp - reading the domain.pot $result = file_get_contents($this->path . DS . 'domain.pot');