public function testAllowsPassingDbOptions() { $this->services->setService('Config', array( 'zf-oauth2' => array( 'db' => array( 'username' => 'foo', 'password' => 'bar', 'dsn' => 'sqlite::memory:', 'options' => array( 'foo' => 'bar' ) ), ), )); $adapter = $this->factory->createService($this->services); $this->assertInstanceOf('ZF\OAuth2\Adapter\PdoAdapter', $adapter); }
public function testAllowsPassingDbOptions() { $this->services->setService('config', ['zf-oauth2' => ['db' => ['username' => 'foo', 'password' => 'bar', 'dsn' => 'sqlite::memory:', 'options' => [PDO::ATTR_EMULATE_PREPARES => true]]]]); $adapter = $this->factory->createService($this->services); $this->assertInstanceOf('ZF\\OAuth2\\Adapter\\PdoAdapter', $adapter); }
public function testInstanceCreated() { $this->services->setService('Configuration', array('zf-oauth2' => array('db' => array('username' => 'foo', 'password' => 'bar', 'dsn' => 'sqlite::memory:')))); $adapter = $this->factory->createService($this->services); $this->assertInstanceOf('ZF\\OAuth2\\Adapter\\PdoAdapter', $adapter); }