assertTrue(is_array($context)); } function testFunctionsPHP() { $context = Timber::context(); $this->assertEquals('App\StarterSite', get_class($context['site'])); $this->assertTrue(current_theme_supports('post-thumbnails')); $this->assertEquals('bar', $context['foo']); } function testLoading() { $str = Timber::compile('partials/tease.twig'); $this->assertStringStartsWith('
', $str); $this->assertStringEndsWith('
', $str); } /** * Helper test to output current twig version */ function testTwigVersion() { $version = Timber::compile_string("{{ version }}", ['version' => Twig\Environment::VERSION]); $this->assertEquals(Twig\Environment::VERSION, $version); } // function testTwigFilter() { // $str = Timber::compile_string('{{ "foo"|myfoo }}'); // $this->assertEquals('foo bar!', $str); // } }