Contao\CoreBundle\Test\Contao\ImageTest::testSetZoomOutOfBoundsPositive PHP Method

testSetZoomOutOfBoundsPositive() public method

Tests the setZoomLevel() method with a positive out of bounds value.
    public function testSetZoomOutOfBoundsPositive()
    {
        /** @var File|\PHPUnit_Framework_MockObject_MockObject $fileMock */
        $fileMock = $this->getMockBuilder('Contao\\File')->setMethods(['__get', 'exists'])->setConstructorArgs(['dummy.jpg'])->getMock();
        $fileMock->expects($this->any())->method('exists')->will($this->returnValue(true));
        $fileMock->expects($this->any())->method('__get')->will($this->returnCallback(function ($key) {
            switch ($key) {
                case 'extension':
                    return 'jpg';
                default:
                    return null;
            }
        }));
        $imageObj = new Image($fileMock);
        $imageObj->setZoomLevel(101);
    }