public function testRender()
 {
     $source = '{{ foo }}';
     $data = array('bar' => 'baz');
     $output = 'TEH OUTPUT';
     $template = $this->getMockBuilder('Mustache_Template')->disableOriginalConstructor()->getMock();
     $mustache = new MustacheStub();
     $mustache->template = $template;
     $template->expects($this->once())->method('render')->with($data)->will($this->returnValue($output));
     $this->assertEquals($output, $mustache->render($source, $data));
     $this->assertEquals($source, $mustache->source);
 }
 public function testWithoutLambdaCache()
 {
     $mustache = new MustacheStub(array('cache' => self::$tempDir));
     $this->assertInstanceOf('Mustache_Cache_NoopCache', $mustache->getProtectedLambdaCache());
     $this->assertNotSame($mustache->getCache(), $mustache->getProtectedLambdaCache());
 }