Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
8f8edc0c
Unverified
Commit
8f8edc0c
authored
Mar 12, 2018
by
photodude
Committed by
Sergei Morozov
Mar 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing of MSSQL on Windows with AppVeyor
parent
3bfaa821
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
262 additions
and
1 deletion
+262
-1
.appveyor.yml
.appveyor.yml
+108
-0
.gitattributes
.gitattributes
+1
-0
composer.json
composer.json
+1
-1
MysqliConnectionTest.php
...octrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php
+4
-0
mssql.sql2008r2sp2.sqlsrv.appveyor.xml
tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml
+37
-0
mssql.sql2012sp1.sqlsrv.appveyor.xml
tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml
+37
-0
mssql.sql2017.pdo_sqlsrv.appveyor.xml
tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml
+37
-0
mssql.sql2017.sqlsrv.appveyor.xml
tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml
+37
-0
No files found.
.appveyor.yml
0 → 100644
View file @
8f8edc0c
build
:
false
platform
:
-
x64
#matrix:
# fast_finish: true # kills the build at the first failure
clone_folder
:
C:\projects\dbal
clone_depth
:
1
cache
:
-
C:\ProgramData\chocolatey\bin -> .appveyor.yml
-
C:\ProgramData\chocolatey\lib -> .appveyor.yml
-
c:\tools\php -> .appveyor.yml
-
composer.phar
-
'
%LOCALAPPDATA%\Composer\files'
#- vendor
## Build matrix for lowest and highest possible targets
environment
:
matrix
:
-
db
:
mssql
driver
:
sqlsrv
db_version
:
sql2008r2sp2
php
:
7.1
-
db
:
mssql
driver
:
sqlsrv
db_version
:
sql2012sp1
php
:
7.1
-
db
:
mssql
driver
:
sqlsrv
db_version
:
sql2017
php
:
7.1
-
db
:
mssql
driver
:
pdo_sqlsrv
db_version
:
sql2017
php
:
7.1
init
:
-
SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
-
SET COMPOSER_NO_INTERACTION=1
-
SET ANSICON=121x90 (121x90)
## Install PHP and composer, and run the appropriate composer command
install
:
-
ps
:
|
# Check if installation is cached
if (!(Test-Path c:\tools\php)) {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
# install sqlite
appveyor-retry cinst -y sqlite
Get-ChildItem -Path c:\tools\php
cd c:\tools\php
# Set PHP environment items that are always needed
copy php.ini-production php.ini
Add-Content php.ini "`n date.timezone=UTC"
Add-Content php.ini "`n extension_dir=ext"
Add-Content php.ini "`n extension=php_openssl.dll"
Add-Content php.ini "`n extension=php_mbstring.dll"
Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll"
# If needed get the MSSQL DLL's
if ($env:db -eq "mssql") {
$DLLVersion = "5.2.0rc1"
cd c:\tools\php\ext
$source = "https://windows.php.net/downloads/pecl/releases/sqlsrv/$($DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip"
$destination = "c:\tools\php\ext\php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip"
Invoke-WebRequest $source -OutFile $destination
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip > $null
$source = "https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip"
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip"
Invoke-WebRequest $source -OutFile $destination
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip > $null
Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
Add-Content php.ini "`n"
}
cd c:\projects\dbal
if (!(Test-Path c:\projects\dbal\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
}
}
# install composer dependencies
-
appveyor-retry php composer.phar self-update
-
appveyor-retry php composer.phar install --no-progress --profile
before_test
:
# Selectively start the services
-
ps
:
>-
if ($env:db -eq "mssql") {
$instanceName = $env:db_version.ToUpper()
Start-Service "MSSQL`$$instanceName"
}
test_script
:
-
cd C:\projects\dbal
-
ps
:
>-
if ($env:db_version) {
vendor\bin\phpunit -c tests\appveyor\%db%.%db_version%.%driver%.appveyor.xml
}
else {
vendor\bin\phpunit -c tests\appveyor\%db%.%driver%.appveyor.xml
}
.gitattributes
View file @
8f8edc0c
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
.gitattributes export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.gitmodules export-ignore
.appveyor.yml export-ignore
.travis.yml export-ignore
.travis.yml export-ignore
build.properties export-ignore
build.properties export-ignore
build.xml export-ignore
build.xml export-ignore
...
...
composer.json
View file @
8f8edc0c
...
@@ -42,6 +42,6 @@
...
@@ -42,6 +42,6 @@
}
}
},
},
"archive"
:
{
"archive"
:
{
"exclude"
:
[
"!vendor"
,
"tests"
,
"*phpunit.xml"
,
".travis.yml"
,
"build.xml"
,
"build.properties"
,
"composer.phar"
]
"exclude"
:
[
"!vendor"
,
"tests"
,
"*phpunit.xml"
,
".
appveyor.yml"
,
".
travis.yml"
,
"build.xml"
,
"build.properties"
,
"composer.phar"
]
}
}
}
}
tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php
View file @
8f8edc0c
...
@@ -23,6 +23,10 @@ class MysqliConnectionTest extends DbalTestCase
...
@@ -23,6 +23,10 @@ class MysqliConnectionTest extends DbalTestCase
parent
::
setUp
();
parent
::
setUp
();
if
(
!
$this
->
connectionMock
->
getDatabasePlatform
()
instanceof
MySqlPlatform
)
{
$this
->
markTestSkipped
(
'MySQL only test.'
);
}
$this
->
connectionMock
=
$this
->
getMockBuilder
(
MysqliConnection
::
class
)
$this
->
connectionMock
=
$this
->
getMockBuilder
(
MysqliConnection
::
class
)
->
disableOriginalConstructor
()
->
disableOriginalConstructor
()
->
getMockForAbstractClass
();
->
getMockForAbstractClass
();
...
...
tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml
0 → 100644
View file @
8f8edc0c
<?xml version="1.0" encoding="utf-8"?>
<phpunit
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals=
"false"
colors=
"true"
bootstrap=
"../../vendor/autoload.php"
>
<php>
<ini
name=
"error_reporting"
value=
"-1"
/>
<var
name=
"db_type"
value=
"sqlsrv"
/>
<var
name=
"db_host"
value=
"(local)\SQL2008R2SP2"
/>
<var
name=
"db_username"
value=
"sa"
/>
<var
name=
"db_password"
value=
"Password12!"
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"1433"
/>
<var
name=
"tmpdb_type"
value=
"sqlsrv"
/>
<var
name=
"tmpdb_host"
value=
"(local)\SQL2008R2SP2"
/>
<var
name=
"tmpdb_username"
value=
"sa"
/>
<var
name=
"tmpdb_password"
value=
"Password12!"
/>
<var
name=
"tmpdb_port"
value=
"1433"
/>
</php>
<testsuites>
<testsuite
name=
"Doctrine DBAL Test Suite"
>
<directory>
../Doctrine/Tests/DBAL
</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>
performance
</group>
<group>
locking_functional
</group>
</exclude>
</groups>
</phpunit>
tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml
0 → 100644
View file @
8f8edc0c
<?xml version="1.0" encoding="utf-8"?>
<phpunit
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals=
"false"
colors=
"true"
bootstrap=
"../../vendor/autoload.php"
>
<php>
<ini
name=
"error_reporting"
value=
"-1"
/>
<var
name=
"db_type"
value=
"sqlsrv"
/>
<var
name=
"db_host"
value=
"(local)\SQL2012SP1"
/>
<var
name=
"db_username"
value=
"sa"
/>
<var
name=
"db_password"
value=
"Password12!"
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"1433"
/>
<var
name=
"tmpdb_type"
value=
"sqlsrv"
/>
<var
name=
"tmpdb_host"
value=
"(local)\SQL2012SP1"
/>
<var
name=
"tmpdb_username"
value=
"sa"
/>
<var
name=
"tmpdb_password"
value=
"Password12!"
/>
<var
name=
"tmpdb_port"
value=
"1433"
/>
</php>
<testsuites>
<testsuite
name=
"Doctrine DBAL Test Suite"
>
<directory>
../Doctrine/Tests/DBAL
</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>
performance
</group>
<group>
locking_functional
</group>
</exclude>
</groups>
</phpunit>
tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml
0 → 100644
View file @
8f8edc0c
<?xml version="1.0" encoding="utf-8"?>
<phpunit
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals=
"false"
colors=
"true"
bootstrap=
"../../vendor/autoload.php"
>
<php>
<ini
name=
"error_reporting"
value=
"-1"
/>
<var
name=
"db_type"
value=
"pdo_sqlsrv"
/>
<var
name=
"db_host"
value=
"(local)\SQL2017"
/>
<var
name=
"db_username"
value=
"sa"
/>
<var
name=
"db_password"
value=
"Password12!"
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"1433"
/>
<var
name=
"tmpdb_type"
value=
"pdo_sqlsrv"
/>
<var
name=
"tmpdb_host"
value=
"(local)\SQL2017"
/>
<var
name=
"tmpdb_username"
value=
"sa"
/>
<var
name=
"tmpdb_password"
value=
"Password12!"
/>
<var
name=
"tmpdb_port"
value=
"1433"
/>
</php>
<testsuites>
<testsuite
name=
"Doctrine DBAL Test Suite"
>
<directory>
../Doctrine/Tests/DBAL
</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>
performance
</group>
<group>
locking_functional
</group>
</exclude>
</groups>
</phpunit>
tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml
0 → 100644
View file @
8f8edc0c
<?xml version="1.0" encoding="utf-8"?>
<phpunit
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://schema.phpunit.de/4.8/phpunit.xsd"
backupGlobals=
"false"
colors=
"true"
bootstrap=
"../../vendor/autoload.php"
>
<php>
<ini
name=
"error_reporting"
value=
"-1"
/>
<var
name=
"db_type"
value=
"sqlsrv"
/>
<var
name=
"db_host"
value=
"(local)\SQL2017"
/>
<var
name=
"db_username"
value=
"sa"
/>
<var
name=
"db_password"
value=
"Password12!"
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"1433"
/>
<var
name=
"tmpdb_type"
value=
"sqlsrv"
/>
<var
name=
"tmpdb_host"
value=
"(local)\SQL2017"
/>
<var
name=
"tmpdb_username"
value=
"sa"
/>
<var
name=
"tmpdb_password"
value=
"Password12!"
/>
<var
name=
"tmpdb_port"
value=
"1433"
/>
</php>
<testsuites>
<testsuite
name=
"Doctrine DBAL Test Suite"
>
<directory>
../Doctrine/Tests/DBAL
</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>
performance
</group>
<group>
locking_functional
</group>
</exclude>
</groups>
</phpunit>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment