'); $this->assertEquals('my string and string', $engine->render('my <> and <>', 'string')); } public function testRender() { $engine = new Engine(); $this->assertEquals( 'Oh! The cat jumped onto the table', $engine->render( 'Oh! {subj.det} {subj.np} {verb} onto {w.where.det} {w.where.np}', array( 'verb' => 'jumped', 'subj' => array('det' => 'The', 'np' => 'cat'), 'w' => array('where' => array('det' => 'the', 'np' => 'table')) ) ) ); } public function testRenderWithObjectValues() { $engine = new Engine; $this->assertEquals('foo', $engine->render('{value}', array('value' => new ObjectMock()))); } } class ObjectMock { function __toString() { return 'foo'; } }