Skip to content

Commit ce562a3

Browse files
committed
Test using service
1 parent 4230b8a commit ce562a3

File tree

5 files changed

+27
-46
lines changed

5 files changed

+27
-46
lines changed

.github/workflows/phpunit.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,5 @@ jobs:
8080
- run: ./vendor/bin/phpunit tests/SqliteDatabase*
8181
- run: ./vendor/bin/phpunit tests/MysqlDatabase*
8282
- run: ./vendor/bin/phpunit tests/PostgresDatabase*
83-
- run: ./vendor/bin/phpunit tests/SqlServer*
83+
- run: ./vendor/bin/phpunit tests/SqlServerSqlsrv*
84+
- run: ./vendor/bin/phpunit tests/SqlServerDblib*

tests/SqlServerDatabaseTest.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

tests/SqlServerDatabaseCustomTest.php renamed to tests/SqlServerDblibDatabaseCustomTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* @requires extension pdo_dblib
77
*/
8-
class SqlServerDatabaseCustomTest extends SqlServerDblibDatabaseTest
8+
class SqlServerDblibDatabaseCustomTest extends SqlServerDblibDatabaseTest
99
{
1010
protected $migrationTable = "some_table_version";
1111
}

tests/SqlServerDblibDatabaseTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,17 @@ public function setUp(): void
3535
$this->migrate->registerDatabase($this->scheme, DblibDatabase::class);
3636
parent::setUp();
3737
}
38+
39+
public function getExpectedUsersVersion1()
40+
{
41+
if ($this->scheme == "sqlsrv") {
42+
return parent::getExpectedUsersVersion1();
43+
}
44+
45+
return [
46+
["id" => 1, "name" => 'John Doe', 'createdate' => '2016-01-10 00:00:00'],
47+
["id" => 2, "name" => 'Jane Doe', 'createdate' => '2015-12-30 00:00:00']
48+
];
49+
}
50+
3851
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
require_once 'SqlServerSqlsrvDatabaseTest.php';
4+
5+
/**
6+
* @requires extension pdo_dblib
7+
*/
8+
class SqlServerSqlsrvDatabaseCustomTest extends SqlServerSqlsrvDatabaseTest
9+
{
10+
protected $migrationTable = "some_table_version";
11+
}

0 commit comments

Comments
 (0)