Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing HtmlHelper tests.
  • Loading branch information
markstory committed Jul 4, 2012
1 parent 1e461b7 commit fd575d4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Cake/Test/TestCase/View/Helper/HtmlHelperTest.php
Expand Up @@ -194,8 +194,10 @@ public function testLink() {
$this->assertTags($result, $expected);

Router::reload();
Router::connect('/:controller', array('action' => 'index'));
Router::connect('/:controller/:action/*');

$result = $this->Html->link('Posts', array('controller' => 'posts', 'action' => 'index', 'full_base' => true));
$result = $this->Html->link('Posts', array('controller' => 'posts', 'action' => 'index', '_full' => true));
$expected = array('a' => array('href' => FULL_BASE_URL . '/posts'), 'Posts', '/a');
$this->assertTags($result, $expected);

Expand Down Expand Up @@ -332,6 +334,9 @@ public function testLink() {
* @return void
*/
public function testImageTag() {
Router::connect('/:controller', array('action' => 'index'));
Router::connect('/:controller/:action/*');

$this->Html->request->webroot = '';

$result = $this->Html->image('test.gif');
Expand Down Expand Up @@ -1412,6 +1417,8 @@ public function testNestedList() {
* @return void
*/
public function testMeta() {
Router::connect('/:controller', array('action' => 'index'));

$result = $this->Html->meta('this is an rss feed', array('controller' => 'posts', 'ext' => 'rss'));
$this->assertTags($result, array('link' => array('href' => 'preg:/.*\/posts\.rss/', 'type' => 'application/rss+xml', 'rel' => 'alternate', 'title' => 'this is an rss feed')));

Expand Down

0 comments on commit fd575d4

Please sign in to comment.