Ejemplo n.º 1
0
 /**
  * @dataProvider objectParameterValues
  */
 public function testCanRenderWithParameterObjects($params, $search)
 {
     $template = new ZendView();
     $template->addPath(__DIR__ . '/TestAsset');
     $result = $template->render('zendview', $params);
     $this->assertContains($search, $result);
     $content = file_get_contents(__DIR__ . '/TestAsset/zendview.phtml');
     $content = str_replace('<?php echo $name ?>', $search, $content);
     $this->assertEquals($content, $result);
 }
Ejemplo n.º 2
0
 /**
  * @group namespacing
  */
 public function testProperlyResolvesNamespacedTemplate()
 {
     $template = new ZendView();
     $template->addPath(__DIR__ . '/TestAsset/test', 'test');
     $expected = file_get_contents(__DIR__ . '/TestAsset/test/test.phtml');
     $test = $template->render('test::test');
     $this->assertSame($expected, $test);
 }
Ejemplo n.º 3
0
 /**
  * @depends testCallingFactoryWithNoConfigReturnsZendViewInstance
  */
 public function testUnconfiguredZendViewInstanceContainsNoPaths(ZendView $view)
 {
     $paths = $view->getPaths();
     $this->assertInternalType('array', $paths);
     $this->assertEmpty($paths);
 }