shouldReceive('create') ->andReturn( Mockery::mock('Icinga\Data\Db\DbConnection') ->shouldReceive('getDbType') ->andReturn('mysql') ->shouldReceive('setTablePrefix') ->getMock() ); ConfigWithSetModuleConfig::setModuleConfig('monitoring', 'backends', new ConfigObject(array( 'backendName' => array( 'type' => 'ido', 'resource' => 'ido' ) ))); $defaultBackend = Backend::createBackend(); $this->assertEquals('backendName', $defaultBackend->getName(), 'Default backend has name set'); } }