Пример #1
0
 /**
  * Test __toString() function.
  *
  * @access public
  * @return void
  */
 public function test__toString()
 {
     $m = new Mustache('{{first_name}} {{last_name}}', array('first_name' => 'Karl', 'last_name' => 'Marx'));
     $this->assertEquals('Karl Marx', $m->__toString());
     $this->assertEquals('Karl Marx', (string) $m);
     $m2 = $this->getMock(self::TEST_CLASS, array('render'), array());
     $m2->expects($this->once())->method('render')->will($this->returnValue('foo'));
     $this->assertEquals('foo', $m2->render());
 }