Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correcting tests affected by changes in Router.

  • Loading branch information...
commit 3cdf22d860dd312a1d92f3edac5d31b14463fc9b 1 parent 79cd856
@markstory markstory authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 cake/tests/cases/libs/controller/scaffold.test.php
View
14 cake/tests/cases/libs/controller/scaffold.test.php
@@ -412,11 +412,11 @@ function testIndexScaffold() {
$this->assertPattern('#<h2>Scaffold Mock</h2>#', $result);
$this->assertPattern('#<table cellpadding="0" cellspacing="0">#', $result);
- //TODO: add testing for table generation
+
$this->assertPattern('#<a href="/scaffold_users/view/1">1</a>#', $result); //belongsTo links
- $this->assertPattern('#<li><a href="/scaffold_mock/add/">New Scaffold Mock</a></li>#', $result);
- $this->assertPattern('#<li><a href="/scaffold_users/">List Scaffold Users</a></li>#', $result);
- $this->assertPattern('#<li><a href="/scaffold_comments/add/">New Comment</a></li>#', $result);
+ $this->assertPattern('#<li><a href="/scaffold_mock/add">New Scaffold Mock</a></li>#', $result);
+ $this->assertPattern('#<li><a href="/scaffold_users">List Scaffold Users</a></li>#', $result);
+ $this->assertPattern('#<li><a href="/scaffold_comments/add">New Comment</a></li>#', $result);
}
/**
@@ -458,7 +458,7 @@ function testViewScaffold() {
$this->assertPattern('/<li><a href="\/scaffold_mock\/delete\/1"[^>]*>Delete Scaffold Mock<\/a>\s*<\/li>/', $result);
//check related table
$this->assertPattern('/<div class="related">\s*<h3>Related Scaffold Comments<\/h3>\s*<table cellpadding="0" cellspacing="0">/', $result);
- $this->assertPattern('/<li><a href="\/scaffold_comments\/add\/">New Comment<\/a><\/li>/', $result);
+ $this->assertPattern('/<li><a href="\/scaffold_comments\/add">New Comment<\/a><\/li>/', $result);
}
/**
@@ -542,7 +542,7 @@ function testAdminIndexScaffold() {
$this->assertPattern('/<h2>Scaffold Mock<\/h2>/', $result);
$this->assertPattern('/<table cellpadding="0" cellspacing="0">/', $result);
//TODO: add testing for table generation
- $this->assertPattern('/<li><a href="\/admin\/scaffold_mock\/add\/">New Scaffold Mock<\/a><\/li>/', $result);
+ $this->assertPattern('/<li><a href="\/admin\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result);
Configure::write('Routing.prefixes', $_backAdmin);
}
@@ -630,7 +630,7 @@ function testMultiplePrefixScaffold() {
$this->assertPattern('/<h2>Scaffold Mock<\/h2>/', $result);
$this->assertPattern('/<table cellpadding="0" cellspacing="0">/', $result);
//TODO: add testing for table generation
- $this->assertPattern('/<li><a href="\/member\/scaffold_mock\/add\/">New Scaffold Mock<\/a><\/li>/', $result);
+ $this->assertPattern('/<li><a href="\/member\/scaffold_mock\/add">New Scaffold Mock<\/a><\/li>/', $result);
Configure::write('Routing.prefixes', $_backAdmin);
}
Please sign in to comment.
Something went wrong with that request. Please try again.