diff --git a/tests/HelperFunctionsTest.php b/tests/HelperFunctionsTest.php index 001a464..241b3e4 100644 --- a/tests/HelperFunctionsTest.php +++ b/tests/HelperFunctionsTest.php @@ -170,14 +170,10 @@ public function testThat_object_has_property_WorksAsExpected() { $this->assertFalse( object_has_property($obj_without_magic_methods, 'title2') ); // string property $obj_real_and_dynamic_props_and_no_magic_methods = new TestValueObject2('John Doe', 47); - $obj_real_and_dynamic_props_and_no_magic_methods->dynamic_property1 = 'dynamic_property1'; - $obj_real_and_dynamic_props_and_no_magic_methods->dynamic_property2 = 'dynamic_property2'; $this->assertTrue( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'name') ); // public property $this->assertTrue( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'age') ); // public property $this->assertTrue( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'protected_field') ); // protected property $this->assertTrue( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'private_field') ); // private property - $this->assertTrue( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'dynamic_property1') ); // dynamically assigned property - $this->assertTrue( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'dynamic_property2') ); // dynamically assigned property $this->assertFalse( object_has_property($obj_real_and_dynamic_props_and_no_magic_methods, 'non_existent_property') ); // non-existent property } diff --git a/tests/UtilsTest.php b/tests/UtilsTest.php index 3fe9359..5a0017a 100644 --- a/tests/UtilsTest.php +++ b/tests/UtilsTest.php @@ -52,11 +52,7 @@ public function testThatGetClosureFromCallableWorksAsExpected() { $this->assertTrue( Utils::getClosureFromCallable(\Descendant::class.'::who') instanceof \Closure ); // static method call string syntax - - $this->assertTrue( - Utils::getClosureFromCallable([\Descendant::class, 'parent::who']) instanceof \Closure - ); // parent class' static method call - + $this->assertTrue( Utils::getClosureFromCallable( (new \Descendant()) ) instanceof \Closure ); // instance of class that has __invoke()