From d2e67cf26d55a1b7bd18fcb20e2b3f7f43373681 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Sat, 23 Jul 2016 17:26:51 +0100 Subject: [PATCH] Added a couple more assertions --- src/AnemicTrait.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/AnemicTrait.php b/src/AnemicTrait.php index b2f4544..f540b60 100644 --- a/src/AnemicTrait.php +++ b/src/AnemicTrait.php @@ -75,7 +75,11 @@ public function testPropertiesAreCorrectlyDefined() { $rc = new ReflectionClass($this->getObjectAndParams()['object']); - foreach ($rc->getProperties() as $property) { + $props = $rc->getProperties(); + + $this->assertInternalType('array', $props); + + foreach ($props as $property) { $this->assertTrue($property->isPublic()); $this->assertFalse($property->isStatic()); } @@ -85,6 +89,8 @@ public function testPropertyAccessBehavesCorrectly() { extract($this->getObjectAndParams()); + $this->assertInternalType('array', $params); + foreach ($params as $key => $value) { $this->assertSame($value, $object->{$key}); }