Skip to content

Commit

Permalink
use getConnection in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saeideng committed Mar 19, 2018
1 parent f20b771 commit 3195338
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/Database/Driver/SqlserverTest.php
Expand Up @@ -126,7 +126,7 @@ public function testConnectionConfigCustom()
'settings' => ['config1' => 'value1', 'config2' => 'value2'],
];
$driver = $this->getMockBuilder('Cake\Database\Driver\Sqlserver')
->setMethods(['_connect', 'connection'])
->setMethods(['_connect', 'getConnection'])
->setConstructorArgs([$config])
->getMock();
$dsn = 'sqlsrv:Server=foo;Database=bar;MultipleActiveResultSets=false';
Expand Down Expand Up @@ -165,7 +165,7 @@ public function testConnectionConfigCustom()
$driver->expects($this->once())->method('_connect')
->with($dsn, $expected);

$driver->expects($this->any())->method('connection')
$driver->expects($this->any())->method('getConnection')
->will($this->returnValue($connection));

$driver->connect();
Expand Down

0 comments on commit 3195338

Please sign in to comment.