diff --git a/tests/units/Sizers/Original.php b/tests/units/Sizers/Original.php new file mode 100644 index 0000000..a333368 --- /dev/null +++ b/tests/units/Sizers/Original.php @@ -0,0 +1,36 @@ +given($image = $this->image(__DIR__.'/../100x200.jpg')) + ->integer($image->width())->isEqualTo(100) + ->integer($image->height())->isEqualTo(200) + ->variable($image->sizer()->resizeToWidth())->isNull() + ->variable($image->sizer()->resizeToHeight())->isNull() + ->variable($image->sizer()->cropToWidth())->isNull() + ->variable($image->sizer()->cropToHeight())->isNull() + ->given($image->rotate()) + ->integer($image->width())->isEqualTo(200) + ->integer($image->height())->isEqualTo(100) + ->variable($image->sizer()->resizeToWidth())->isNull() + ->variable($image->sizer()->resizeToHeight())->isNull() + ->variable($image->sizer()->cropToWidth())->isNull() + ->variable($image->sizer()->cropToHeight())->isNull() + ; + } + + protected function image(string $path) + { + $driver = new MockDriver(); + return $driver->image($path, new SizerUnderTest()); + } +}