Skip to content

Commit

Permalink
Add tests for Sqlserver DSN usage
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Oct 13, 2014
1 parent b8e92ef commit 0e744bf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 1 addition & 5 deletions appveyor.yml
Expand Up @@ -7,14 +7,10 @@ branches:
- 3.0
environment:
global:
db_class: 'Cake\Database\Driver\SqlServer'
db_database: 'cakephp'
db_login: 'sa'
db_password: 'Password12!'
PHP: "C:/PHP"
matrix:
- db: 2012
db_dsn: 'sqlsrv:Server=.\SQL2012SP1;Database=cakephp;MultipleActiveResultSets=false'
db_dsn: 'Cake\Database\Driver\Sqlserver://sa:Password12!@.\SQL2012SP1/cakephp?MultipleActiveResultSets=false'
services:
- mssql2012sp1
init:
Expand Down
12 changes: 12 additions & 0 deletions tests/TestCase/Core/StaticConfigTraitTest.php
Expand Up @@ -91,6 +91,18 @@ public function testSimpleParseDsn() {
'path' => '/',
];
$this->assertEquals($expected, $klassName::parseDsn(['url' => $dsn]));

$dsn = 'Cake\Database\Driver\Sqlserver://sa:Password12!@.\SQL2012SP1/cakephp?MultipleActiveResultSets=false';
$expected = [
'className' => 'Cake\Database\Driver\Sqlserver',
'driver' => 'Cake\Database\Driver\Sqlserver',
'host' => '.\SQL2012SP1',
'MultipleActiveResultSets' => false,
'password' => 'Password12!',
'path' => '/cakephp',
'username' => 'sa',
];
$this->assertEquals($expected, $klassName::parseDsn(['url' => $dsn]));
}

/**
Expand Down

0 comments on commit 0e744bf

Please sign in to comment.