Vous êtes connecté en tant que anonymous Se Deconnecter
instance = new TwigRenderer(static::$path); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @return void */ protected function tearDown(): void { } /** * Method to test render(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::render */ public function testRender() { $html = $this->instance->render('default'); $expect = <<

(_global/global) Lorem ipsum dolor sit amet

(default) Nulla sed libero sem. Praesent ac dignissim risus.

(foo/bar) Phasellus vitae bibendum neque, quis suscipit urna. Fusce eu odio ante.

(_global/global) Suspendisse finibus fermentum massa ut tempus.

HTML; $this->assertDomStringEqualsDomString($expect, $html); } /** * Method to test render(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::render */ public function testRenderWithDotPath() { $this->instance->config->set('path_separator', '.'); $html = $this->instance->render('default_dot'); $expect = <<

(_global/global) Lorem ipsum dolor sit amet

(default) Nulla sed libero sem. Praesent ac dignissim risus.

(foo/bar) Phasellus vitae bibendum neque, quis suscipit urna. Fusce eu odio ante.

(_global/global) Suspendisse finibus fermentum massa ut tempus.

HTML; $this->assertDomStringEqualsDomString($expect, $html); } /** * Method to test getLoader(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::getLoader */ public function testGetLoader() { $this->assertInstanceOf('Twig_Loader_Filesystem', $this->instance->getLoader()); } /** * Method to test setLoader(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::setLoader * @TODO Implement testSetLoader(). */ public function testSetLoader() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * Method to test addExtension(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::addExtension */ public function testAddExtension() { $this->instance->addExtension(new StubTwigExtension()); $html = $this->instance->render('ext-test.twig'); $expect = <<Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Suspendisse finibus fermentum massa ut tempus. Sed in pulvinar dolor.

HTML; $this->assertDomStringEqualsDomString($expect, $html); } /** * Method to test setTwig(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::setTwig * @TODO Implement testSetTwig(). */ public function testSetTwig() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } /** * Method to test getDebugExtension(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::getDebugExtension */ public function testGetDebugExtension() { $this->assertInstanceOf('Twig_Extension_Debug', $this->instance->getDebugExtension()); } /** * Method to test setDebugExtension(). * * @return void * * @covers \Windwalker\Renderer\TwigRenderer::setDebugExtension * @TODO Implement testSetDebugExtension(). */ public function testSetDebugExtension() { // Remove the following lines when you implement this test. $this->markTestIncomplete( 'This test has not been implemented yet.' ); } }