Created
February 5, 2017 01:01
-
-
Save bitwombat/df51fb62aa45d7e30d40ceb68605b93b to your computer and use it in GitHub Desktop.
merge/overrides don't seem to be working correctly...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function setUp() | |
{ | |
// The module configuration should still be applicable for tests. | |
// You can override configuration here with test case specific values, | |
// such as sample view templates, path stacks, module_listener_options, | |
// etc. | |
$configOverrides = [ | |
'doctrine' => [ | |
'connection' => [ | |
// Configuration for service `doctrine.connection.orm_default` service | |
'orm_default' => [ | |
// configuration instance to use. The retrieved service name will | |
// be `doctrine.configuration.$thisSetting` | |
'configuration' => 'orm_default', | |
// event manager instance to use. The retrieved service name will | |
// be `doctrine.eventmanager.$thisSetting` | |
'eventmanager' => 'orm_default', | |
'params' => [ | |
'driver' => 'sqlite', | |
'user' => 'project', | |
'password' => 'project', | |
'memory' => true, | |
], | |
], | |
], | |
], | |
]; | |
$this->setApplicationConfig(ArrayUtils::merge( | |
// Grabbing the full application configuration: | |
include __DIR__ . '/../../../../config/application.config.php', | |
$configOverrides | |
)); | |
parent::setUp(); | |
$services = $this->getApplicationServiceLocator(); | |
$config = $services->get('config'); // $config doesn't have a 'doctrine' key | |
// unset($config['doctrine']); | |
$services->setAllowOverride(true); | |
$services->setService('config', $config); | |
$services->setAllowOverride(false); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment