Exemple #1
0
 public function testSnippetsCanBeMappedToReplaceContent()
 {
     $items = array(array('title' => 'One'), array('title' => 'Two'));
     $snippet = T::snippet('tests/data/test.html', '.things', function ($item) {
         return array('h3' => T::content($item['title']));
     });
     $html = T::fetch($this->p, array('.things' => T::map($snippet, $items)));
     $this->assertContains('One', $html);
     $this->assertContains('Two', $html);
 }