Skip to content

Commit

Permalink
Updating tests to reflect changes in default bake templates.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 12, 2009
1 parent 7d4bc20 commit 382488a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cake/tests/cases/console/libs/tasks/view.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ function testGetContent() {
);
$result = $this->Task->getContent('view', $vars);

$this->assertPattern('/Delete Test View Model/', $result);
$this->assertPattern('/Edit Test View Model/', $result);
$this->assertPattern('/List Test View Models/', $result);
$this->assertPattern('/New Test View Model/', $result);
$this->assertPattern('/Delete .+Test View Model/', $result);
$this->assertPattern('/Edit .+Test View Model/', $result);
$this->assertPattern('/List .+Test View Models/', $result);
$this->assertPattern('/New .+Test View Model/', $result);

$this->assertPattern('/testViewModel\[\'TestViewModel\'\]\[\'id\'\]/', $result);
$this->assertPattern('/testViewModel\[\'TestViewModel\'\]\[\'name\'\]/', $result);
Expand Down Expand Up @@ -197,10 +197,10 @@ function testGetContentWithAdminAction() {
);
$result = $this->Task->getContent('admin_view', $vars);

$this->assertPattern('/Delete Test View Model/', $result);
$this->assertPattern('/Edit Test View Model/', $result);
$this->assertPattern('/List Test View Models/', $result);
$this->assertPattern('/New Test View Model/', $result);
$this->assertPattern('/Delete .+Test View Model/', $result);
$this->assertPattern('/Edit .+Test View Model/', $result);
$this->assertPattern('/List .+Test View Models/', $result);
$this->assertPattern('/New .+Test View Model/', $result);

$this->assertPattern('/testViewModel\[\'TestViewModel\'\]\[\'id\'\]/', $result);
$this->assertPattern('/testViewModel\[\'TestViewModel\'\]\[\'name\'\]/', $result);
Expand Down Expand Up @@ -264,7 +264,7 @@ function testBakeActions() {
));
$this->Task->expectAt(1, 'createFile', array(
TMP . 'view_task_comments' . DS . 'edit.ctp',
new PatternExpectation('/Edit View Task Comment/')
new PatternExpectation('/Edit .+View Task Comment/')
));
$this->Task->expectAt(2, 'createFile', array(
TMP . 'view_task_comments' . DS . 'index.ctp',
Expand Down Expand Up @@ -390,11 +390,11 @@ function testExecuteInteractive() {
));
$this->Task->expectAt(2, 'createFile', array(
TMP . 'view_task_comments' . DS . 'add.ctp',
new PatternExpectation('/Add View Task Comment/')
new PatternExpectation('/Add .+View Task Comment/')
));
$this->Task->expectAt(3, 'createFile', array(
TMP . 'view_task_comments' . DS . 'edit.ctp',
new PatternExpectation('/Edit View Task Comment/')
new PatternExpectation('/Edit .+View Task Comment/')
));

$this->Task->execute();
Expand Down Expand Up @@ -445,11 +445,11 @@ function testExecuteInteractiveWithAdmin() {
));
$this->Task->expectAt(2, 'createFile', array(
TMP . 'view_task_comments' . DS . 'admin_add.ctp',
new PatternExpectation('/Add View Task Comment/')
new PatternExpectation('/Add .+View Task Comment/')
));
$this->Task->expectAt(3, 'createFile', array(
TMP . 'view_task_comments' . DS . 'admin_edit.ctp',
new PatternExpectation('/Edit View Task Comment/')
new PatternExpectation('/Edit .+View Task Comment/')
));

$this->Task->execute();
Expand Down

0 comments on commit 382488a

Please sign in to comment.