Browse Source

use getConnection in tests

saeideng 8 years ago
parent
commit
3195338ab7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tests/TestCase/Database/Driver/SqlserverTest.php

+ 2 - 2
tests/TestCase/Database/Driver/SqlserverTest.php

@@ -126,7 +126,7 @@ class SqlserverTest extends TestCase
             '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';
@@ -165,7 +165,7 @@ class SqlserverTest extends TestCase
         $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();