function testTimberImageInTwigToString() { $iid = TimberImageTest::get_image_attachment(); $str = '{{TimberImage(' . $iid . ')}}'; $compiled = Timber::compile_string($str); $this->assertEquals('http://example.org/wp-content/uploads/' . date('Y') . '/' . date('m') . '/arch.jpg', $compiled); }