readTestImage('animation.gif'); $this->assertEquals(8, count($image)); $result = $image->modify(new RemoveAnimationModifier(2)); $this->assertEquals(1, count($image)); $this->assertEquals(1, count($result)); } public function testApplyPercent(): void { $image = $this->readTestImage('animation.gif'); $this->assertEquals(8, count($image)); $result = $image->modify(new RemoveAnimationModifier('20%')); $this->assertEquals(1, count($image)); $this->assertEquals(1, count($result)); } public function testApplyNonAnimated(): void { $image = $this->readTestImage('test.jpg'); $this->assertEquals(1, count($image)); $result = $image->modify(new RemoveAnimationModifier()); $this->assertEquals(1, count($image)); $this->assertEquals(1, count($result)); } public function testApplyInvalid(): void { $image = $this->readTestImage('animation.gif'); $this->expectException(InputException::class); $image->modify(new RemoveAnimationModifier('test')); } }