Skip to content

Commit

Permalink
Added test for caching of custom tag attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Del Harvey committed Oct 22, 2013
1 parent cf1adff commit d26d0ef
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/lotsofcode/TagCloud/TagCloudTest.php
Expand Up @@ -163,4 +163,20 @@ public function testAttributeCache()
$this->assertContains("tag", $attributes);
$this->assertContains("size", $attributes);
}

public function testCustomAttributeCache()
{
$tagCloud = new TagCloud();
$tagCloud->addTag(array("tag" => "Howdy", "description" => "Greeting"));

$attributes = $tagCloud->getAttributes();

$this->assertContains("tag", $attributes);
$this->assertContains("size", $attributes);
$this->assertContains("description", $attributes);

$cloud = $tagCloud->render("array");

$this->assertSame("Greeting", $cloud['howdy']['description']);
}
}

0 comments on commit d26d0ef

Please sign in to comment.