| @@ 11-26 (lines=16) @@ | ||
| 8 | ||
| 9 | class AbstractOracleDriverTest extends AbstractDriverTest |
|
| 10 | { |
|
| 11 | public function testReturnsDatabaseName() |
|
| 12 | { |
|
| 13 | $params = array( |
|
| 14 | 'user' => 'foo', |
|
| 15 | 'password' => 'bar', |
|
| 16 | 'dbname' => 'baz', |
|
| 17 | ); |
|
| 18 | ||
| 19 | $connection = $this->getConnectionMock(); |
|
| 20 | ||
| 21 | $connection->expects($this->once()) |
|
| 22 | ->method('getParams') |
|
| 23 | ->will($this->returnValue($params)); |
|
| 24 | ||
| 25 | self::assertSame($params['user'], $this->driver->getDatabase($connection)); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function testReturnsDatabaseNameWithConnectDescriptor() |
|
| 29 | { |
|
| @@ 28-45 (lines=18) @@ | ||
| 25 | self::assertSame($params['user'], $this->driver->getDatabase($connection)); |
|
| 26 | } |
|
| 27 | ||
| 28 | public function testReturnsDatabaseNameWithConnectDescriptor() |
|
| 29 | { |
|
| 30 | $params = array( |
|
| 31 | 'user' => 'foo', |
|
| 32 | 'password' => 'bar', |
|
| 33 | 'connectionstring' => '(DESCRIPTION=' . |
|
| 34 | '(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' . |
|
| 35 | '(CONNECT_DATA=(SERVICE_NAME=baz)))' |
|
| 36 | ); |
|
| 37 | ||
| 38 | $connection = $this->getConnectionMock(); |
|
| 39 | ||
| 40 | $connection->expects($this->once()) |
|
| 41 | ->method('getParams') |
|
| 42 | ->will($this->returnValue($params)); |
|
| 43 | ||
| 44 | self::assertSame($params['user'], $this->driver->getDatabase($connection)); |
|
| 45 | } |
|
| 46 | ||
| 47 | protected function createDriver() |
|
| 48 | { |
|
| @@ 11-27 (lines=17) @@ | ||
| 8 | ||
| 9 | class AbstractSQLiteDriverTest extends AbstractDriverTest |
|
| 10 | { |
|
| 11 | public function testReturnsDatabaseName() |
|
| 12 | { |
|
| 13 | $params = array( |
|
| 14 | 'user' => 'foo', |
|
| 15 | 'password' => 'bar', |
|
| 16 | 'dbname' => 'baz', |
|
| 17 | 'path' => 'bloo', |
|
| 18 | ); |
|
| 19 | ||
| 20 | $connection = $this->getConnectionMock(); |
|
| 21 | ||
| 22 | $connection->expects($this->once()) |
|
| 23 | ->method('getParams') |
|
| 24 | ->will($this->returnValue($params)); |
|
| 25 | ||
| 26 | self::assertSame($params['path'], $this->driver->getDatabase($connection)); |
|
| 27 | } |
|
| 28 | ||
| 29 | protected function createDriver() |
|
| 30 | { |
|
| @@ 150-165 (lines=16) @@ | ||
| 147 | $this->driver->createDatabasePlatformForVersion('foo'); |
|
| 148 | } |
|
| 149 | ||
| 150 | public function testReturnsDatabaseName() |
|
| 151 | { |
|
| 152 | $params = array( |
|
| 153 | 'user' => 'foo', |
|
| 154 | 'password' => 'bar', |
|
| 155 | 'dbname' => 'baz', |
|
| 156 | ); |
|
| 157 | ||
| 158 | $connection = $this->getConnectionMock(); |
|
| 159 | ||
| 160 | $connection->expects($this->once()) |
|
| 161 | ->method('getParams') |
|
| 162 | ->will($this->returnValue($params)); |
|
| 163 | ||
| 164 | self::assertSame($params['dbname'], $this->driver->getDatabase($connection)); |
|
| 165 | } |
|
| 166 | ||
| 167 | public function testReturnsDatabasePlatform() |
|
| 168 | { |
|