public function testConfigurations() { $connectionConfig = new \Packaged\Config\Provider\Ini\IniConfigProvider(Path::build(__DIR__, 'resources', 'connections.ini')); $datastoreConfig = new \Packaged\Config\Provider\Ini\IniConfigProvider(Path::build(__DIR__, 'resources', 'datastores.ini')); $resolver = new \Packaged\Dal\DalResolver($connectionConfig, $datastoreConfig); $this->assertFalse($resolver->hasConnection('conX')); $this->assertTrue($resolver->hasConnection('con1')); $this->assertFalse($resolver->hasDatastore('ds2')); $this->assertFalse($resolver->hasDatastore('ds1')); $this->assertTrue($resolver->hasDatastore('qlds')); $this->assertTrue($resolver->hasDatastore('filesystem')); $connection = $resolver->getConnection('con1'); /** * @var $connection ConfigurableConnection */ $this->assertEquals('Connection Test', $connection->getConfig()->getItem('name')); $this->setExpectedException('\\Packaged\\Dal\\Exceptions\\DalResolver\\ConnectionNotFoundException'); $resolver->getConnection('con2'); }