Fixing all helpers tests after massing search and replace that broke parameter order on assertTags()

This commit is contained in:
Jose Lorenzo Rodriguez 2011-05-17 00:06:22 -04:30
parent 217e9e0330
commit 1b14887e3a
5 changed files with 468 additions and 468 deletions

File diff suppressed because it is too large Load diff

View file

@ -194,11 +194,11 @@ class HtmlHelperTest extends CakeTestCase {
$result = $this->Html->link('/home');
$expected = array('a' => array('href' => '/home'), 'preg:/\/home/', '/a');
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Posts', array('controller' => 'posts', 'action' => 'index', 'full_base' => true));
$expected = array('a' => array('href' => FULL_BASE_URL . '/posts'), 'Posts', '/a');
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Home', '/home', array('confirm' => 'Are you sure you want to do this?'));
$expected = array(
@ -206,7 +206,7 @@ class HtmlHelperTest extends CakeTestCase {
'Home',
'/a'
);
$this->assertTags($expected, $result, true);
$this->assertTags($result, $expected);
$result = $this->Html->link('Home', '/home', array('default' => false));
$expected = array(
@ -214,7 +214,7 @@ class HtmlHelperTest extends CakeTestCase {
'Home',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#');
$expected = array(
@ -222,7 +222,7 @@ class HtmlHelperTest extends CakeTestCase {
'Next >',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array('escape' => true));
$expected = array(
@ -230,7 +230,7 @@ class HtmlHelperTest extends CakeTestCase {
'Next >',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array('escape' => 'utf-8'));
$expected = array(
@ -238,7 +238,7 @@ class HtmlHelperTest extends CakeTestCase {
'Next >',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array('escape' => false));
$expected = array(
@ -246,7 +246,7 @@ class HtmlHelperTest extends CakeTestCase {
'Next >',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array(
'title' => 'to escape … or not escape?',
@ -257,7 +257,7 @@ class HtmlHelperTest extends CakeTestCase {
'Next >',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Next >', '#', array(
'title' => 'to escape … or not escape?',
@ -268,7 +268,7 @@ class HtmlHelperTest extends CakeTestCase {
'Next >',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->link('Original size', array(
'controller' => 'images', 'action' => 'view', 3, '?' => array('height' => 100, 'width' => 200)
@ -278,7 +278,7 @@ class HtmlHelperTest extends CakeTestCase {
'Original size',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('Asset.timestamp', false);
@ -288,7 +288,7 @@ class HtmlHelperTest extends CakeTestCase {
'img' => array('src' => 'img/test.gif', 'alt' => ''),
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->image('test.gif', array('url' => '#'));
$expected = array(
@ -296,7 +296,7 @@ class HtmlHelperTest extends CakeTestCase {
'img' => array('src' => 'img/test.gif', 'alt' => ''),
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('Asset.timestamp', 'force');
@ -306,7 +306,7 @@ class HtmlHelperTest extends CakeTestCase {
'img' => array('src' => 'preg:/img\/..\/favicon\.ico\?\d*/', 'alt' => ''),
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->image('../favicon.ico', array('url' => '#'));
$expected = array(
@ -314,7 +314,7 @@ class HtmlHelperTest extends CakeTestCase {
'img' => array('src' => 'preg:/img\/..\/favicon\.ico\?\d*/', 'alt' => ''),
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -362,7 +362,7 @@ class HtmlHelperTest extends CakeTestCase {
$expected = array(
'img' => array('src' => 'preg:/\/testing\/longer\/img\/cake\.icon\.png\?[0-9]+/', 'alt' => '')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -426,14 +426,14 @@ class HtmlHelperTest extends CakeTestCase {
$expected = array(
'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*theme\/test_theme\/css\/webroot_test\.css/')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Html->theme = 'test_theme';
$result = $this->Html->css('theme_webroot');
$expected = array(
'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*theme\/test_theme\/css\/theme_webroot\.css/')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('App.www_root', $webRoot);
}
@ -468,27 +468,27 @@ class HtmlHelperTest extends CakeTestCase {
$expected = array(
'link' => array('rel' => 'stylesheet', 'type' => 'text/css', 'href' => 'preg:/.*css\/screen\.css/')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->css('screen.css');
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->css('my.css.library');
$expected['link']['href'] = 'preg:/.*css\/my\.css\.library\.css/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->css('screen.css?1234');
$expected['link']['href'] = 'preg:/.*css\/screen\.css\?1234/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->css('http://whatever.com/screen.css?1234');
$expected['link']['href'] = 'preg:/http:\/\/.*\/screen\.css\?1234/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('Asset.filter.css', 'css.php');
$result = $this->Html->css('cake.generic');
$expected['link']['href'] = 'preg:/.*ccss\/cake\.generic\.css/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('Asset.filter.css', false);
@ -528,29 +528,29 @@ class HtmlHelperTest extends CakeTestCase {
$result = $this->Html->css('cake.generic');
$expected['link']['href'] = 'preg:/.*css\/cake\.generic\.css\?[0-9]+/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('debug', 0);
$result = $this->Html->css('cake.generic');
$expected['link']['href'] = 'preg:/.*css\/cake\.generic\.css/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Configure::write('Asset.timestamp', 'force');
$result = $this->Html->css('cake.generic');
$expected['link']['href'] = 'preg:/.*css\/cake\.generic\.css\?[0-9]+/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Html->request->webroot = '/testing/';
$result = $this->Html->css('cake.generic');
$expected['link']['href'] = 'preg:/\/testing\/css\/cake\.generic\.css\?[0-9]+/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Html->request->webroot = '/testing/longer/';
$result = $this->Html->css('cake.generic');
$expected['link']['href'] = 'preg:/\/testing\/longer\/css\/cake\.generic\.css\?[0-9]+/';
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -591,7 +591,7 @@ class HtmlHelperTest extends CakeTestCase {
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'js/foo.js')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->script(array('foobar', 'bar'));
$expected = array(
@ -600,31 +600,31 @@ class HtmlHelperTest extends CakeTestCase {
array('script' => array('type' => 'text/javascript', 'src' => 'js/bar.js')),
'/script',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->script('jquery-1.3');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'js/jquery-1.3.js')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->script('test.json');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'js/test.json.js')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->script('/plugin/js/jquery-1.3.2.js?someparam=foo');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => '/plugin/js/jquery-1.3.2.js?someparam=foo')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->script('test.json.js?foo=bar');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'js/test.json.js?foo=bar')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->script('foo');
$this->assertNull($result, 'Script returned upon duplicate inclusion %s');
@ -639,7 +639,7 @@ class HtmlHelperTest extends CakeTestCase {
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'js/jquery-1.3.2.js', 'defer' => 'defer', 'encoding' => 'utf-8')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->View->expects($this->any())->method('addScript')
->with($this->matchesRegularExpression('/script_in_head.js/'));
@ -671,7 +671,7 @@ class HtmlHelperTest extends CakeTestCase {
$expected = array(
'script' => array('src' => '/theme/test_theme/js/__test_js.js', 'type' => 'text/javascript')
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$folder = new Folder(WWW_ROOT . 'theme' . DS . 'test_theme');
$folder->delete();
@ -692,7 +692,7 @@ class HtmlHelperTest extends CakeTestCase {
$this->cDataEnd,
'/script',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->scriptBlock('window.foo = 2;', array('safe' => false));
$expected = array(
@ -700,7 +700,7 @@ class HtmlHelperTest extends CakeTestCase {
'window.foo = 2;',
'/script',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->scriptBlock('window.foo = 2;', array('safe' => true));
$expected = array(
@ -710,7 +710,7 @@ class HtmlHelperTest extends CakeTestCase {
$this->cDataEnd,
'/script',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->View->expects($this->any())->method('addScript')
@ -725,7 +725,7 @@ class HtmlHelperTest extends CakeTestCase {
'window.foo = 2;',
'/script',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -746,7 +746,7 @@ class HtmlHelperTest extends CakeTestCase {
$this->cDataEnd,
'/script'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->scriptStart(array('safe' => false));
@ -759,7 +759,7 @@ class HtmlHelperTest extends CakeTestCase {
'this is some javascript',
'/script'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->View->expects($this->once())->method('addScript');
$result = $this->Html->scriptStart(array('safe' => false, 'inline' => false));
@ -814,7 +814,7 @@ class HtmlHelperTest extends CakeTestCase {
'Third',
'/a',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->getCrumbs(' > ');
$expected = array(
@ -830,7 +830,7 @@ class HtmlHelperTest extends CakeTestCase {
'Third',
'/a',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->assertPattern('/^<a[^<>]+>First<\/a> &gt; <a[^<>]+>Second<\/a> &gt; <a[^<>]+>Third<\/a>$/', $result);
$this->assertPattern('/<a\s+href=["\']+\#first["\']+[^<>]*>First<\/a>/', $result);
@ -856,7 +856,7 @@ class HtmlHelperTest extends CakeTestCase {
'&raquo;',
'Fourth'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -914,7 +914,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ul'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, null);
$expected = array(
@ -944,7 +944,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ul'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, array(), array(), 'ol');
$expected = array(
@ -974,7 +974,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ol'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, 'ol');
$expected = array(
@ -1004,7 +1004,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ol'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, array('class'=>'list'));
$expected = array(
@ -1034,7 +1034,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ul'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, array(), array('class' => 'item'));
$expected = array(
@ -1064,7 +1064,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ul'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, array(), array('even' => 'even', 'odd' => 'odd'));
$expected = array(
@ -1094,7 +1094,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ul'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->nestedList($list, array('class'=>'list'), array('class' => 'item'));
$expected = array(
@ -1124,7 +1124,7 @@ class HtmlHelperTest extends CakeTestCase {
'/li',
'/ul'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1160,14 +1160,14 @@ class HtmlHelperTest extends CakeTestCase {
'link' => array('href' => 'preg:/.*favicon\.ico/', 'rel' => 'icon'),
array('link' => array('href' => 'preg:/.*favicon\.ico/', 'rel' => 'shortcut icon'))
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->meta('icon', 'favicon.ico');
$expected = array(
'link' => array('href' => 'preg:/.*favicon\.ico/', 'type' => 'image/x-icon', 'rel' => 'icon'),
array('link' => array('href' => 'preg:/.*favicon\.ico/', 'type' => 'image/x-icon', 'rel' => 'shortcut icon'))
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Html->meta('keywords', 'these, are, some, meta, keywords');
$this->assertTags($result, array('meta' => array('name' => 'keywords', 'content' => 'these, are, some, meta, keywords')));
@ -1197,7 +1197,7 @@ class HtmlHelperTest extends CakeTestCase {
function testTableHeaders() {
$result = $this->Html->tableHeaders(array('ID', 'Name', 'Date'));
$expected = array('<tr', '<th', 'ID', '/th', '<th', 'Name', '/th', '<th', 'Date', '/th', '/tr');
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1220,7 +1220,7 @@ class HtmlHelperTest extends CakeTestCase {
array('td' => array('width' => 'preg:/100px/')), 'td content 3', '/td',
'/tr'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$tr = array('td content 1', 'td content 2', 'td content 3');
$result = $this->Html->tableCells($tr, null, null, true);
@ -1231,7 +1231,7 @@ class HtmlHelperTest extends CakeTestCase {
array('td' => array('class' => 'column-3')), 'td content 3', '/td',
'/tr'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$tr = array('td content 1', 'td content 2', 'td content 3');
$result = $this->Html->tableCells($tr, true);
@ -1242,7 +1242,7 @@ class HtmlHelperTest extends CakeTestCase {
array('td' => array('class' => 'column-3')), 'td content 3', '/td',
'/tr'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$tr = array(
array('td content 1', 'td content 2', 'td content 3'),

View file

@ -269,7 +269,7 @@ class JsHelperTest extends CakeTestCase {
$this->cDataEnd,
'/script',
);
$this->assertTags($expected, $result, true);
$this->assertTags($result, $expected);
$this->Js->TestJsEngine->expects($this->atLeastOnce())->method('domReady');
$result = $this->Js->writeBuffer(array('onDomReady' => true, 'cache' => false, 'clear' => false));
@ -326,7 +326,7 @@ class JsHelperTest extends CakeTestCase {
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'preg:/(.)*\.js/'),
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
preg_match('/src="(.*\.js)"/', $result, $filename);
$this->assertTrue(file_exists(WWW_ROOT . $filename[1]));
$contents = file_get_contents(WWW_ROOT . $filename[1]);
@ -363,7 +363,7 @@ class JsHelperTest extends CakeTestCase {
'test link',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -400,7 +400,7 @@ class JsHelperTest extends CakeTestCase {
'test link »',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -419,7 +419,7 @@ class JsHelperTest extends CakeTestCase {
'test link',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -451,7 +451,7 @@ class JsHelperTest extends CakeTestCase {
$this->cDataEnd,
'/script'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -482,7 +482,7 @@ class JsHelperTest extends CakeTestCase {
'-event handler-',
'/script'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -521,7 +521,7 @@ class JsHelperTest extends CakeTestCase {
'input' => array('type' => 'submit', 'id' => $options['id'], 'value' => 'Save', 'style' => 'margin: 0'),
'/div'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -567,7 +567,7 @@ class JsHelperTest extends CakeTestCase {
'input' => array('type' => 'submit', 'id' => $options['id'], 'value' => 'Save'),
'/div'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -612,7 +612,7 @@ class JsHelperTest extends CakeTestCase {
'event-handler',
'/script'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**

View file

@ -122,7 +122,7 @@ class PaginatorHelperTest extends CakeTestCase {
$expected = array(
'span' => array('class' => 'disabled'), 'prev', '/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -161,7 +161,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->sort('date');
$expected = array(
@ -169,7 +169,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Date',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->sort('title', 'TestTitle');
$expected = array(
@ -177,7 +177,7 @@ class PaginatorHelperTest extends CakeTestCase {
'TestTitle',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->sort('title', array('asc' => 'ascending', 'desc' => 'descending'));
$expected = array(
@ -185,7 +185,7 @@ class PaginatorHelperTest extends CakeTestCase {
'ascending',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['sort'] = 'title';
$result = $this->Paginator->sort('title', array('asc' => 'ascending', 'desc' => 'descending'));
@ -194,7 +194,7 @@ class PaginatorHelperTest extends CakeTestCase {
'descending',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['order'] = array('Article.title' => 'desc');
$this->Paginator->request->params['paging']['Article']['options']['sort'] = null;
@ -252,7 +252,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Article.full Name',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->sort('full_name');
$expected = array(
@ -260,7 +260,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Full Name',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['order'] = array('full_name' => 'desc');
$result = $this->Paginator->sort('Article.full_name');
@ -269,7 +269,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Article.full Name',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->sort('full_name');
$expected = array(
@ -277,7 +277,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Full Name',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -302,7 +302,7 @@ class PaginatorHelperTest extends CakeTestCase {
'TestTitle',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->sort('title', array('asc' => 'ascending', 'desc' => 'descending'), array('direction' => 'desc'));
$expected = array(
@ -310,7 +310,7 @@ class PaginatorHelperTest extends CakeTestCase {
'descending',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -334,7 +334,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['order'] = array('Article.title' => 'asc');
@ -344,7 +344,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['order'] = array('Account.title' => 'asc');
$result = $this->Paginator->sort('title');
@ -353,7 +353,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -469,7 +469,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
Router::reload();
Router::setRequestInfo(array(
@ -484,7 +484,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->options(array('url' => array('param')));
$result = $this->Paginator->sort('Article.title', 'Title');
@ -493,7 +493,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -509,7 +509,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Controller',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->url();
$this->assertEqual($result, '/index/page:1');
@ -562,7 +562,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Name',
'/a'
);
$this->assertTags($expected, $result, true);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('next', array('url' => $options));
$expected = array(
@ -572,7 +572,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('prev', array('url' => $options));
$expected = array(
@ -582,7 +582,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$options = array('members' => true, 'controller' => 'posts', 'order' => array('name' => 'desc'));
$result = $this->Paginator->url($options);
@ -681,7 +681,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers();
$expected = array(
@ -699,7 +699,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/articles/index/2/page:7/foo:bar')), '7', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('Next');
$expected = array(
@ -709,7 +709,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -739,7 +739,7 @@ class PaginatorHelperTest extends CakeTestCase {
'&lt;&lt; Previous',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('<< Previous', null, null, array('class' => 'disabled', 'tag' => 'div'));
$expected = array(
@ -747,7 +747,7 @@ class PaginatorHelperTest extends CakeTestCase {
'&lt;&lt; Previous',
'/div'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 2;
$this->Paginator->request->params['paging']['Client']['prevPage'] = true;
@ -759,7 +759,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('Next');
$expected = array(
@ -769,7 +769,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('Next', array('tag' => 'li'));
$expected = array(
@ -779,7 +779,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/li'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('<< Previous', array('escape' => true));
$expected = array(
@ -789,7 +789,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('<< Previous', array('escape' => false));
$expected = array(
@ -799,7 +799,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -822,7 +822,7 @@ class PaginatorHelperTest extends CakeTestCase {
'&lt;strong&gt;Disabled&lt;/strong&gt;',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('<< Previous', null, '<strong>Disabled</strong>', array('escape' => true));
$expected = array(
@ -830,7 +830,7 @@ class PaginatorHelperTest extends CakeTestCase {
'&lt;strong&gt;Disabled&lt;/strong&gt;',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('<< Previous', null, '<strong>Disabled</strong>', array('escape' => false));
$expected = array(
@ -838,7 +838,7 @@ class PaginatorHelperTest extends CakeTestCase {
'<strong', 'Disabled', '/strong',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -871,7 +871,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result, true);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('Next');
$expected = array(
@ -885,7 +885,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -912,7 +912,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -934,7 +934,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -964,7 +964,7 @@ class PaginatorHelperTest extends CakeTestCase {
'preg:/<< Previous/',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('Next >>', array('escape' => false));
$expected = array(
@ -974,7 +974,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1021,13 +1021,13 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->next('Next', array('model' => 'Server'), 'No Next', array('model' => 'Server'));
$expected = array(
'span' => array('class' => 'next'), 'No Next', '/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1043,7 +1043,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Sort by title on page 5',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['page'] = 2;
$result = $this->Paginator->link('Sort by title', array('sort' => 'title', 'direction' => 'desc'));
@ -1052,7 +1052,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Sort by title',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['options']['page'] = 4;
$result = $this->Paginator->link('Sort by title on page 4', array('sort' => 'Article.title', 'direction' => 'desc'));
@ -1061,7 +1061,7 @@ class PaginatorHelperTest extends CakeTestCase {
'Sort by title on page 4',
'/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1143,7 +1143,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:12')), '12', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(array('tag' => 'li'));
$expected = array(
@ -1165,7 +1165,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('li' => array()), array('a' => array('href' => '/index/page:12')), '12', '/a', '/li',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(array('tag' => 'li', 'separator' => false));
$expected = array(
@ -1179,7 +1179,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('li' => array()), array('a' => array('href' => '/index/page:11')), '11', '/a', '/li',
array('li' => array()), array('a' => array('href' => '/index/page:12')), '12', '/a', '/li',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(true);
$expected = array(
@ -1205,7 +1205,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:15', 'rel' => 'last')), 'last', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1241,7 +1241,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
@ -1278,7 +1278,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:15')), '15', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1315,7 +1315,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(array('last' => 1));
$expected = array(
@ -1337,7 +1337,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:9')), '9', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1377,7 +1377,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('span' => array('class' => 'current')), '15', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1418,7 +1418,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:15')), '15', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1459,7 +1459,7 @@ class PaginatorHelperTest extends CakeTestCase {
'...',
array('span' => array()), array('a' => array('href' => '/index/page:42')), '42', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1500,7 +1500,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:42')), '42', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1525,7 +1525,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:3')), '3', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
'Client' => array(
@ -1552,7 +1552,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:4/sort:Client.name/direction:DESC')), '4', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging'] = array(
@ -1584,7 +1584,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 3;
@ -1602,7 +1602,7 @@ class PaginatorHelperTest extends CakeTestCase {
' | ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(array('first' => 2, 'modulus' => 2, 'last' => 2, 'separator' => ' - '));
$expected = array(
@ -1618,7 +1618,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 5, 'last' => 5, 'separator' => ' - '));
$expected = array(
@ -1644,7 +1644,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 4893;
$result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - '));
@ -1673,7 +1673,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 58;
$result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - '));
@ -1708,7 +1708,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 5;
$result = $this->Paginator->numbers(array('first' => 5, 'modulus' => 4, 'last' => 5, 'separator' => ' - '));
@ -1737,7 +1737,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 3;
$result = $this->Paginator->numbers(array('first' => 2, 'modulus' => 2, 'last' => 2, 'separator' => ' - ', 'ellipsis' => ' ~~~ '));
@ -1754,7 +1754,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Client']['page'] = 3;
$result = $this->Paginator->numbers(array('first' => 2, 'modulus' => 2, 'last' => 2, 'separator' => ' - ', 'ellipsis' => '<span class="ellipsis">...</span>'));
@ -1771,7 +1771,7 @@ class PaginatorHelperTest extends CakeTestCase {
' - ',
array('span' => array()), array('a' => array('href' => '/index/page:4897')), '4897', '/a', '/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1788,7 +1788,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/li'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->last(2, array('tag' => 'li'));
@ -1802,7 +1802,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('a' => array('href' => '/index/page:7')), '7', '/a',
'/li',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1852,7 +1852,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -1869,7 +1869,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->first(2);
$expected = array(
@ -1881,7 +1881,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('a' => array('href' => '/index/page:2')), '2', '/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['page'] = 2;
$result = $this->Paginator->first(3);
@ -1903,7 +1903,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->last(1);
$expected = array(
@ -1914,7 +1914,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->request->params['paging']['Article']['page'] = 6;
@ -1929,7 +1929,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('a' => array('href' => '/index/page:7')), '7', '/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->last(3);
$this->assertEquals('', $result, 'When inside the last links range, no links should be made');
@ -1967,7 +1967,7 @@ class PaginatorHelperTest extends CakeTestCase {
'last &gt;&gt;', '/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->last(1);
$expected = array(
@ -1976,7 +1976,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('a' => array('href' => '/index/page:15/sort:Client.name/direction:DESC')), '15', '/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->last(2);
$expected = array(
@ -1989,7 +1989,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('a' => array('href' => '/index/page:15/sort:Client.name/direction:DESC')), '15', '/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->last(2, array('ellipsis' => '<span class="ellipsis">...</span>'));
$expected = array(
@ -2002,7 +2002,7 @@ class PaginatorHelperTest extends CakeTestCase {
array('a' => array('href' => '/index/page:15/sort:Client.name/direction:DESC')), '15', '/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -2098,21 +2098,21 @@ class PaginatorHelperTest extends CakeTestCase {
$expected = array(
'a' => array('href' => '/my_plugin/magazines/index/page:3'), 'Page 3', '/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->options(array('url' => array('action' => 'another_index')));
$result = $this->Paginator->link('Page 3', array('page' => 3));
$expected = array(
'a' => array('href' => '/my_plugin/magazines/another_index/page:3'), 'Page 3', '/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->options(array('url' => array('controller' => 'issues')));
$result = $this->Paginator->link('Page 3', array('page' => 3));
$expected = array(
'a' => array('href' => '/my_plugin/issues/index/page:3'), 'Page 3', '/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$this->Paginator->options(array('url' => array('plugin' => null)));
$result = $this->Paginator->link('Page 3', array('page' => 3));
@ -2125,7 +2125,7 @@ class PaginatorHelperTest extends CakeTestCase {
$expected = array(
'a' => array('href' => '/issues/index/page:3'), 'Page 3', '/a'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -2164,7 +2164,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -2258,7 +2258,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Paginator->prev('Prev');
$expected = array(
@ -2268,7 +2268,7 @@ class PaginatorHelperTest extends CakeTestCase {
'/a',
'/span'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**

View file

@ -64,7 +64,7 @@ class RssHelperTest extends CakeTestCase {
'version' => '2.0'
)
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Rss->document(null, 'content');
$expected = array(
@ -73,7 +73,7 @@ class RssHelperTest extends CakeTestCase {
),
'content'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Rss->document(array('contrived' => 'parameter'), 'content');
$expected = array(
@ -83,7 +83,7 @@ class RssHelperTest extends CakeTestCase {
),
'content'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -113,7 +113,7 @@ class RssHelperTest extends CakeTestCase {
'content',
'/channel'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -163,7 +163,7 @@ class RssHelperTest extends CakeTestCase {
'content-here',
'/channel',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
function testChannelElementAttributes() {
@ -205,7 +205,7 @@ class RssHelperTest extends CakeTestCase {
'content-here',
'/channel',
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -242,7 +242,7 @@ class RssHelperTest extends CakeTestCase {
'<description', 'description3', '/description',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$result = $this->Rss->items(array());
$expected = '';
@ -278,7 +278,7 @@ class RssHelperTest extends CakeTestCase {
'/guid',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$item = array(
'title' => 'My Title',
@ -308,7 +308,7 @@ class RssHelperTest extends CakeTestCase {
'/guid',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$item = array(
'title' => 'My Title & more'
@ -319,7 +319,7 @@ class RssHelperTest extends CakeTestCase {
'<title', 'My Title &amp; more', '/title',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$item = array(
'title' => 'Foo bar',
@ -353,7 +353,7 @@ class RssHelperTest extends CakeTestCase {
'/guid',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -377,7 +377,7 @@ class RssHelperTest extends CakeTestCase {
'/title',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$item = array(
'category' => array(
@ -394,7 +394,7 @@ class RssHelperTest extends CakeTestCase {
'/category',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$item = array(
'category' => array(
@ -420,7 +420,7 @@ class RssHelperTest extends CakeTestCase {
'/category',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
$item = array(
'title' => array(
@ -476,7 +476,7 @@ class RssHelperTest extends CakeTestCase {
'/category',
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
/**
@ -514,6 +514,6 @@ class RssHelperTest extends CakeTestCase {
),
'/item'
);
$this->assertTags($expected, $result);
$this->assertTags($result, $expected);
}
}