diff --git a/tests/unit/Framework/Constraint/ObjectHasPropertyTest.php b/tests/unit/Framework/Constraint/ObjectHasPropertyTest.php index f6ffc071acf..955389bd25c 100644 --- a/tests/unit/Framework/Constraint/ObjectHasPropertyTest.php +++ b/tests/unit/Framework/Constraint/ObjectHasPropertyTest.php @@ -28,7 +28,8 @@ public function testConstraintObjectHasAttribute(): void $this->assertCount(1, $constraint); $this->expectException(ExpectationFailedException::class); - $this->expectExceptionMessage(<<<'EOF' + $this->expectExceptionMessage( + <<<'EOF' Failed asserting that object of class "stdClass" has property "privateAttribute". EOF ); @@ -46,9 +47,11 @@ public function testConstraintObjectHasAttribute2(): void $constraint = new ObjectHasProperty('privateAttribute'); $this->expectException(ExpectationFailedException::class); - $this->expectExceptionMessage(<<expectExceptionMessage( + <<evaluate(new stdClass, 'custom message'); } @@ -57,9 +60,11 @@ public function testConstraintObjectHasAttributeWithNoObject(): void $constraint = new ObjectHasProperty('privateAttribute'); $this->expectException(ExpectationFailedException::class); - $this->expectExceptionMessage(<<expectExceptionMessage( + <<evaluate('', 'custom message'); } }