Skip to content

Commit

Permalink
Fix EccubeTestCase::cleanUpProperties()
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess committed Jan 12, 2018
1 parent bdd4852 commit 08f9aaa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/Eccube/Tests/EccubeTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ abstract class EccubeTestCase extends WebTestCase
protected $eccubeConfig;

/**
* Applicaiton を生成しトランザクションを開始する.
* Client を生成しトランザクションを開始する.
*/
public function setUp()
{
Expand Down Expand Up @@ -222,7 +222,7 @@ public function deleteAllRows(array $tables)
}

/**
* PHPUnit_* インスタンスのプロパティを初期化する.
* PHPUnit インスタンスのプロパティを初期化する.
*
* このメソッドは、PHPUnit のメモリリーク解消のため、 tearDown() メソッドでコールされる.
*
Expand All @@ -232,13 +232,11 @@ protected function cleanUpProperties()
{
$refl = new \ReflectionObject($this);
foreach ($refl->getProperties() as $prop) {
if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit_')) {
if (!$prop->isStatic() && 0 !== strpos($prop->getDeclaringClass()->getName(), 'PHPUnit')) {
$prop->setAccessible(true);
$prop->setValue($this, null);
}
}
// TODO
// \Eccube\Application::clearInstance();
}

/**
Expand Down

0 comments on commit 08f9aaa

Please sign in to comment.