Skip to content

Commit

Permalink
Merge pull request #201 from DanielSiepmann/feature/178-support-priva…
Browse files Browse the repository at this point in the history
…te-properties

Do not unset private properties in tearDown
  • Loading branch information
bmack committed Sep 30, 2020
2 parents 9d50c33 + a37d1c2 commit 22461bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Classes/Core/Unit/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ protected function tearDown(): void
foreach ($reflection->getProperties() as $property) {
$declaringClass = $property->getDeclaringClass()->getName();
if (
!$property->isStatic()
!$property->isPrivate()
&& !$property->isStatic()
&& $declaringClass !== UnitTestCase::class
&& $declaringClass !== BaseTestCase::class
&& strpos($property->getDeclaringClass()->getName(), 'PHPUnit') !== 0
Expand Down

0 comments on commit 22461bc

Please sign in to comment.