Skip to content

Commit

Permalink
Fix spaces around operators.
Browse files Browse the repository at this point in the history
  • Loading branch information
planardothum committed Nov 16, 2012
1 parent a0f323e commit bed9ba2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php
Expand Up @@ -1857,26 +1857,25 @@ public function testCrumbListFirstLink() {
* @return void
*/
public function testCrumbListBootstrapStyle() {

$this->Html->addCrumb('Home', '/', array('class'=>'home'));
$this->Html->addCrumb('Library', '/lib');
$this->Html->addCrumb('Data');
$result = $this->Html->getCrumbList(
array('class' => 'breadcrumb', 'separator'=>'<span class="divider">/</span>', 'firstClass'=>false, 'lastClass'=>'active')
array('class' => 'breadcrumb', 'separator' => '<span class="divider">/</span>', 'firstClass' => false, 'lastClass' => 'active')
);
$this->assertTags(
$result,
array(
array('ul' => array('class' => 'breadcrumb')),
'<li',
array('a' => array('href' => '/')), 'Home', '/a',
array('span'=>array('class'=>'divider')),'preg:/\//','/span',
array('span' =>array('class' => 'divider')), 'preg:/\//', '/span',
'/li',
'<li',
array('a' => array('href' => '/lib')), 'Library', '/a',
array('span'=>array('class'=>'divider')),'preg:/\//','/span',
array('span' => array('class' => 'divider')), 'preg:/\//', '/span',
'/li',
array('li' => array('class' => 'active')),'Data','/li',
array('li' => array('class' => 'active')), 'Data', '/li',
'/ul'
), true
);
Expand All @@ -1888,13 +1887,12 @@ public function testCrumbListBootstrapStyle() {
* @return void
*/
public function testCrumbListZurbStyle() {

$this->Html->addCrumb('Home', '#');
$this->Html->addCrumb('Features', '#');
$this->Html->addCrumb('Gene Splicing', '#');
$this->Html->addCrumb('Home', '#');
$result = $this->Html->getCrumbList(
array( 'class'=>'breadcrumbs', 'firstClass'=>false, 'lastClass'=>'current')
array( 'class' => 'breadcrumbs', 'firstClass' => false, 'lastClass' => 'current')
);
$this->assertTags(
$result,
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -694,7 +694,7 @@ public function getCrumbs($separator = '&raquo;', $startText = false) {
* @link http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#creating-breadcrumb-trails-with-htmlhelper
*/
public function getCrumbList($options = array(), $startText = false) {
$defaults = array('firstClass'=>'first', 'lastClass'=>'last', 'separator' => '');
$defaults = array('firstClass' => 'first', 'lastClass' => 'last', 'separator' => '');
$options = array_merge($defaults, (array)$options);
$firstClass = $options['firstClass'];
$lastClass = $options['lastClass'];
Expand Down

0 comments on commit bed9ba2

Please sign in to comment.