From 7ba98cfe5dab0c58229fb89766c247bb7ca1e57b Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Wed, 13 Jul 2022 19:08:02 +0200 Subject: [PATCH] Add Geometry\Pixel::class --- src/Geometry/Pixel.php | 28 ++++++++++++++++++++++++++++ tests/Geometry/PixelTest.php | 23 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/Geometry/Pixel.php create mode 100644 tests/Geometry/PixelTest.php diff --git a/src/Geometry/Pixel.php b/src/Geometry/Pixel.php new file mode 100644 index 00000000..e1672fdd --- /dev/null +++ b/src/Geometry/Pixel.php @@ -0,0 +1,28 @@ +background = $background; + + return $this; + } + + public function background(): ColorInterface + { + return $this->background; + } +} diff --git a/tests/Geometry/PixelTest.php b/tests/Geometry/PixelTest.php new file mode 100644 index 00000000..6719682a --- /dev/null +++ b/tests/Geometry/PixelTest.php @@ -0,0 +1,23 @@ +withBackground($color); + $this->assertInstanceOf(ColorInterface::class, $pixel->background()); + $this->assertInstanceOf(Pixel::class, $result); + } +}