diff --git a/tests/Geometry/Traits/HasBackgroundColor.php b/tests/Geometry/Traits/HasBackgroundColor.php new file mode 100644 index 00000000..f26095e4 --- /dev/null +++ b/tests/Geometry/Traits/HasBackgroundColor.php @@ -0,0 +1,26 @@ +getTestObject(); + $this->assertNull($object->backgroundColor()); + $this->assertFalse($object->hasBackgroundColor()); + $object->setBackgroundColor('fff'); + $this->assertEquals('fff', $object->backgroundColor()); + $this->assertTrue($object->hasBackgroundColor()); + } +} diff --git a/tests/Geometry/Traits/HasBorderTest.php b/tests/Geometry/Traits/HasBorderTest.php new file mode 100644 index 00000000..e8749b8f --- /dev/null +++ b/tests/Geometry/Traits/HasBorderTest.php @@ -0,0 +1,55 @@ +getTestObject(); + $this->assertNull($object->borderColor()); + $this->assertEquals(0, $object->borderSize()); + $this->assertFalse($object->hasBorder()); + $object->setBorder('fff', 10); + $this->assertEquals('fff', $object->borderColor()); + $this->assertEquals(10, $object->borderSize()); + $this->assertTrue($object->hasBorder()); + } + + public function testSetBorderSize(): void + { + $object = $this->getTestObject(); + $this->assertEquals(0, $object->borderSize()); + $object->setBorderSize(10); + $this->assertEquals(10, $object->borderSize()); + } + + public function testSetBorderColor(): void + { + $object = $this->getTestObject(); + $this->assertNull($object->borderColor()); + $object->setBorderColor('fff'); + $this->assertEquals('fff', $object->borderColor()); + $this->assertFalse($object->hasBorder()); + } + + public function testHasBorder(): void + { + $object = $this->getTestObject(); + $this->assertFalse($object->hasBorder()); + $object->setBorderColor('fff'); + $this->assertFalse($object->hasBorder()); + $object->setBorderSize(1); + $this->assertTrue($object->hasBorder()); + } +}