TestTimberImage::testImageWidthWithFilter PHP Method

testImageWidthWithFilter() public method

    function testImageWidthWithFilter()
    {
        $pid = $this->factory->post->create();
        $photo = $this->copyTestImage();
        $photo = TimberURLHelper::get_rel_path($photo);
        update_post_meta($pid, 'custom_photo', '/' . $photo);
        $str = '{{TimberImage(post.custom_photo).width}}';
        $post = new TimberPost($pid);
        $rendered = Timber::compile_string($str, array('post' => $post));
        $this->assertEquals(1500, $rendered);
    }