Bolt\Tests\Twig\ImageHandlerTest::testShowImageCrop PHP Method

testShowImageCrop() public method

public testShowImageCrop ( )
    public function testShowImageCrop()
    {
        $app = $this->getApp();
        $handler = new ImageHandler($app);
        $result = $handler->showImage('generic-logo.png', null, null, 'f');
        $this->assertSame('<img src="/thumbs/1000x750f/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'fit');
        $this->assertSame('<img src="/thumbs/1000x750f/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'r');
        $this->assertSame('<img src="/thumbs/1000x750r/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'resize');
        $this->assertSame('<img src="/thumbs/1000x750r/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'b');
        $this->assertSame('<img src="/thumbs/1000x750b/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'borders');
        $this->assertSame('<img src="/thumbs/1000x750b/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'c');
        $this->assertSame('<img src="/thumbs/1000x750c/generic-logo.png" width="1000" height="750" alt="">', $result);
        $result = $handler->showImage('generic-logo.png', null, null, 'crop');
        $this->assertSame('<img src="/thumbs/1000x750c/generic-logo.png" width="1000" height="750" alt="">', $result);
    }