Contao\CoreBundle\Test\Image\ImageFactoryTest::testGetImportantPartFromLegacyModeInvalidMode PHP Method

testGetImportantPartFromLegacyModeInvalidMode() public method

Tests the getImportantPartFromLegacyMode() method throws an exception for invalid resize modes.
    public function testGetImportantPartFromLegacyModeInvalidMode()
    {
        $imageMock = $this->getMock('Contao\\Image\\ImageInterface');
        $imageFactory = $this->createImageFactory();
        $this->setExpectedException('InvalidArgumentException', 'not a legacy resize mode');
        $imageFactory->getImportantPartFromLegacyMode($imageMock, 'invalid');
    }