Skip to content

Commit

Permalink
Fixing some extract console tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 21, 2011
1 parent c9ae3c2 commit ac0ec44
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/Cake/tests/cases/console/shells/tasks/extract.test.php
Expand Up @@ -112,10 +112,13 @@ public function testExecute() {
$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."/';
Expand All @@ -126,10 +129,12 @@ public function testExecute() {
$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');

Expand Down

0 comments on commit ac0ec44

Please sign in to comment.