Skip to content

Commit 41c2304

Browse files
committed
Kill the last not covered mutant
1 parent 8fec5af commit 41c2304

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/Reflection/ReflectionProperty.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ public function isInitialized(object|null $object = null): bool
286286
return false;
287287
}
288288

289+
// @infection-ignore-all Throw_: False positive
289290
throw $e;
290291
}
291292
}

test/unit/Fixture/InitializedProperties.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ public function __construct()
2424

2525
public function __get($property)
2626
{
27-
throw new Error();
27+
throw new Error('Removed property');
2828
}
2929
}

test/unit/Reflection/ReflectionPropertyTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,7 @@ public function testIsInitializedThrowsError(): void
778778
$classReflection = $this->reflector->reflectClass(InitializedProperties::class);
779779

780780
self::expectException(Error::class);
781+
self::expectExceptionMessage('Removed property');
781782
$classReflection->getProperty('toBeRemoved')->isInitialized($object);
782783
}
783784

0 commit comments

Comments
 (0)