Skip to content

Commit

Permalink
Reset $registrars at each BaseConfig test, to prevent it get modified…
Browse files Browse the repository at this point in the history
… from other tests.
  • Loading branch information
vibbow committed Apr 16, 2019
1 parent 97abf70 commit 925b8c8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/system/Config/BaseConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ public function testNotEnabled()
$modulesConfig = config('Modules');
$modulesConfig->enabled = false;

$config = new \RegistrarConfig();
$expected = $config::$registrars;
$config = new \RegistrarConfig();
$config::$registrars = [];
$expected = $config::$registrars;

$method = $this->getPrivateMethodInvoker($config, 'registerProperties');
$method();
Expand All @@ -212,7 +213,8 @@ public function testDidDiscovery()
$modulesConfig = config('Modules');
$modulesConfig->enabled = true;

$config = new \RegistrarConfig();
$config = new \RegistrarConfig();
$config::$registrars = [];
$this->setPrivateProperty($config, 'didDiscovery', false);

$method = $this->getPrivateMethodInvoker($config, 'registerProperties');
Expand Down

0 comments on commit 925b8c8

Please sign in to comment.