Skip to content

Commit

Permalink
Adding compile eviction test
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 15, 2014
1 parent 25df631 commit 2118906
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/TestCase/View/StringTemplateTest.php
Expand Up @@ -194,4 +194,19 @@ public function testFormatAttributesArray() {
);
}

/**
* Tests that compile information is refreshed on adds and removes
*
* @return void
*/
public function testCopiledInfoRefresh() {
$compilation = $this->template->compile('link');
$this->template->add([
'link' => '<a bar="{{foo}}">{{baz}}</a>'
]);
$this->assertNotEquals($compilation, $this->template->compile('link'));
$this->template->remove('link');
$this->assertEquals([null, null], $this->template->compile('link'));
}

}

0 comments on commit 2118906

Please sign in to comment.