ImboIntegrationTest\Image\Transformation\BorderTest::testTransformationSupportsDifferentModes PHP Метод

testTransformationSupportsDifferentModes() публичный Метод

public testTransformationSupportsDifferentModes ( $expectedWidth, $expectedHeight, $borderWidth, $borderHeight, $borderMode )
    public function testTransformationSupportsDifferentModes($expectedWidth, $expectedHeight, $borderWidth, $borderHeight, $borderMode)
    {
        $image = $this->getMock('Imbo\\Model\\Image');
        $image->expects($this->once())->method('setWidth')->with($expectedWidth)->will($this->returnValue($image));
        $image->expects($this->once())->method('setHeight')->with($expectedHeight)->will($this->returnValue($image));
        $image->expects($this->once())->method('hasBeenTransformed')->with(true);
        $event = $this->getMock('Imbo\\EventManager\\Event');
        $event->expects($this->at(0))->method('getArgument')->with('image')->will($this->returnValue($image));
        $event->expects($this->at(1))->method('getArgument')->with('params')->will($this->returnValue(['color' => 'white', 'width' => $borderWidth, 'height' => $borderHeight, 'mode' => $borderMode]));
        $blob = file_get_contents(FIXTURES_DIR . '/image.png');
        $imagick = new Imagick();
        $imagick->readImageBlob($blob);
        $this->getTransformation()->setImagick($imagick)->transform($event);
    }