@@ 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 | $this->assertSame($params['user'], $this->driver->getDatabase($connection)); |
|
26 | } |
|
27 | ||
28 | public function testReturnsDatabaseNameWithConnectDescriptor() |
|
29 | { |
|
@@ 28-45 (lines=18) @@ | ||
25 | $this->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 | $this->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 | $this->assertSame($params['path'], $this->driver->getDatabase($connection)); |
|
27 | } |
|
28 | ||
29 | protected function createDriver() |
|
30 | { |
@@ 141-156 (lines=16) @@ | ||
138 | $this->driver->createDatabasePlatformForVersion('foo'); |
|
139 | } |
|
140 | ||
141 | public function testReturnsDatabaseName() |
|
142 | { |
|
143 | $params = array( |
|
144 | 'user' => 'foo', |
|
145 | 'password' => 'bar', |
|
146 | 'dbname' => 'baz', |
|
147 | ); |
|
148 | ||
149 | $connection = $this->getConnectionMock(); |
|
150 | ||
151 | $connection->expects($this->once()) |
|
152 | ->method('getParams') |
|
153 | ->will($this->returnValue($params)); |
|
154 | ||
155 | $this->assertSame($params['dbname'], $this->driver->getDatabase($connection)); |
|
156 | } |
|
157 | ||
158 | public function testReturnsDatabasePlatform() |
|
159 | { |