File tree Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 69
69
ports :
70
70
- ' 5432:5432'
71
71
72
+ mssql :
73
+ image : mcr.microsoft.com/mssql/server:2019-latest
74
+ env :
75
+ ACCEPT_EULA : Y
76
+ SA_PASSWORD : Symfony123
77
+ ports :
78
+ - 1433:1433
79
+
72
80
steps :
73
81
- name : Checkout code
74
82
uses : actions/checkout@v2
@@ -78,13 +86,17 @@ jobs:
78
86
with :
79
87
php-version : ' 8.0'
80
88
coverage : none
89
+ extensions : pdo_sqlsrv
81
90
82
91
- name : Composer install
83
92
uses : ramsey/composer-install@v1
84
93
85
94
- name : Install PHPUnit
86
95
run : vendor/bin/simple-phpunit install
87
96
97
+ - name : Create MSSQL database
98
+ run : ' docker exec ${{ job.services.mssql.id }} /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P Symfony123 -Q "CREATE DATABASE acl_test"'
99
+
88
100
- name : Run functional tests
89
101
run : vendor/bin/simple-phpunit --group functional
90
102
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ protected function setUp(): void
156
156
foreach ($ schema ->toDropSql ($ this ->connection ->getDatabasePlatform ()) as $ sql ) {
157
157
try {
158
158
$ this ->connection ->executeStatement ($ sql );
159
- } catch (TableNotFoundException $ e ) {
159
+ } catch (\ Exception $ e ) {
160
160
}
161
161
}
162
162
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <[email protected] >
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
12
+ namespace Symfony \Component \Security \Acl \Tests \Dbal ;
13
+
14
+ use Doctrine \DBAL \DriverManager ;
15
+
16
+ /**
17
+ * @requires extension pdo_mysql
18
+ * @group functional
19
+ */
20
+ class MSSQL_AclProviderTest extends AclProviderTest
21
+ {
22
+ /** @return Connection */
23
+ protected function createConnection ()
24
+ {
25
+ $ connection = DriverManager::getConnection ([
26
+ 'driver ' => 'pdo_sqlsrv ' ,
27
+ 'host ' => '127.0.0.1 ' ,
28
+ 'user ' => 'sa ' ,
29
+ 'password ' => 'Symfony123 ' ,
30
+ 'dbname ' => 'acl_test ' ,
31
+ ]);
32
+
33
+ return $ connection ;
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments