PhlyTest\Mustache\MustacheTest::testPragmasAreSectionSpecific PHP Method

testPragmasAreSectionSpecific() public method

    public function testPragmasAreSectionSpecific()
    {
        $this->mustache->getRenderer()->addPragma(new Pragma\ImplicitIterator());
        $test = $this->mustache->render('template-with-pragma-in-section', array('type' => 'style', 'section' => array('subsection' => array(1, 2, 3)), 'section2' => array('subsection' => array(1, 2, 3))));
        $this->assertEquals(1, substr_count($test, '1'), $test);
        $this->assertEquals(1, substr_count($test, '2'), $test);
        $this->assertEquals(1, substr_count($test, '3'), $test);
    }
MustacheTest