mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
[ticket/15055] Extend build matrix and trim text in extension_acp_test
PHPBB3-15055
This commit is contained in:
parent
9883aa4930
commit
ede339c1c8
126
.appveyor.yml
126
.appveyor.yml
@ -8,75 +8,113 @@ services:
|
||||
environment:
|
||||
matrix:
|
||||
- db: mssql
|
||||
db_version: sql2017
|
||||
db_version: sql2012sp1
|
||||
php: 7.0
|
||||
- db: mssql
|
||||
db_version: sql2012sp1
|
||||
php: 7.1
|
||||
- db: mssql
|
||||
db_version: sql2014
|
||||
php: 7.1
|
||||
php: 7.0
|
||||
- db: mssql
|
||||
db_version: sql2016
|
||||
php: 7.1
|
||||
php: 7.0
|
||||
- db: mssql
|
||||
db_version: sql2017
|
||||
php: 7.1
|
||||
# - db: mariadb
|
||||
# php: 7.1
|
||||
# - db: mysqli
|
||||
# php: 7.1
|
||||
# - db: sqlite
|
||||
# php: 7.1
|
||||
# - db: postgresql
|
||||
# php: 7.1
|
||||
|
||||
hosts:
|
||||
phpbb.test: 127.0.0.1
|
||||
|
||||
init:
|
||||
- SET PATH=c:\php;%PATH%
|
||||
- SET PATH=%systemroot%\system32\inetsrv\;C:\Program Files\OpenSSL;C:\tools\php;c:\php;%PATH%
|
||||
- SET ANSICON=121x90 (121x90)
|
||||
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
|
||||
|
||||
before_test:
|
||||
- ps: Set-Service wuauserv -StartupType Manual
|
||||
- ps: |
|
||||
$instanceName = $env:db_version.ToUpper()
|
||||
Start-Service "MSSQL`$$instanceName"
|
||||
Set-Variable -Name "sqlServerPath" -Value "(local)\$($env:db_version.ToUpper())"
|
||||
Write-Host "$sqlServerPath"
|
||||
Write-Host "$env:db_version --> $($env:db_version.ToUpper())"
|
||||
sqlcmd -S $sqlServerPath -Q "Use [master]; CREATE DATABASE [phpbb_test] COLLATE Latin1_General_CI_AS"
|
||||
- SET PATH=C:\Program Files\OpenSSL;C:\tools\php;%PATH%
|
||||
- ps: Set-Service wuauserv -StartupType Manual
|
||||
- ps: cinst -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|]','')
|
||||
- ps: Get-ChildItem -Path "c:\tools\php$($env:php -replace '[.]','')" -Recurse |
|
||||
Set-Service wuauserv -StartupType Manual
|
||||
cinst -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|]','')
|
||||
Get-ChildItem -Path "c:\tools\php$($env:php -replace '[.]','')" -Recurse |
|
||||
Move-Item -destination "c:\tools\php"
|
||||
- cd c:\tools\php
|
||||
- ps: cat php.ini-production | %{$_ -replace "memory_limit = 128M","memory_limit = 1024M"} | Out-File -Encoding "Default" php.ini
|
||||
- echo date.timezone="UTC" >> php.ini
|
||||
- echo display_errors=On >> php.ini
|
||||
- echo extension_dir=ext >> php.ini
|
||||
- echo extension=php_openssl.dll >> php.ini
|
||||
- echo extension=php_mbstring.dll >> php.ini
|
||||
- echo extension=php_curl.dll >> php.ini
|
||||
- echo extension=php_gd2.dll >> php.ini
|
||||
- echo extension=php_tidy.dll >> php.ini
|
||||
- echo extension=php_fileinfo.dll >> php.ini
|
||||
- ps: |
|
||||
cd c:\tools\php\ext
|
||||
$DLLVersion = "4.1.6.1"
|
||||
appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip
|
||||
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip > $null
|
||||
appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip
|
||||
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"
|
||||
cat php.ini-production | %{$_ -replace "memory_limit = 128M","memory_limit = 1024M"} | Out-File -Encoding "Default" php.ini
|
||||
Add-Content php.ini "`n date.timezone=UTC"
|
||||
Add-Content php.ini "`n display_errors=On"
|
||||
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_curl.dll"
|
||||
Add-Content php.ini "`n extension=php_gd2.dll"
|
||||
Add-Content php.ini "`n extension=php_tidy.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"
|
||||
Add-Content php.ini "`n extension=php_pdo_mysql.dll"
|
||||
Add-Content php.ini "`n extension=php_mysqli.dll"
|
||||
Add-Content php.ini "`n extension=php_pdo_pgsql.dll"
|
||||
Add-Content php.ini "`n extension=php_pgsql.dll"
|
||||
|
||||
# Get MSSQL driver
|
||||
if ($env:db -eq "mssql") {
|
||||
cd c:\tools\php\ext
|
||||
$DLLVersion = "4.1.6.1"
|
||||
appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip
|
||||
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip > $null
|
||||
appveyor-retry appveyor DownloadFile http://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc14-x64.zip
|
||||
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"
|
||||
|
||||
$instanceName = $env:db_version.ToUpper()
|
||||
Start-Service "MSSQL`$$instanceName"
|
||||
Set-Variable -Name "sqlServerPath" -Value "(local)\$($env:db_version.ToUpper())"
|
||||
|
||||
# Create database write test config
|
||||
sqlcmd -S $sqlServerPath -Q "Use [master]; CREATE DATABASE [phpbb_test] COLLATE Latin1_General_CI_AS"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mssqlnative';`n`$dbhost = '.\\$env:db_version';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'sa';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "mysqli") {
|
||||
Start-Service MySQL57
|
||||
$env:MYSQL_PWD="Password12!"
|
||||
$cmd = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -e "create database phpbb_test;" --user=root'
|
||||
iex "& $cmd"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mysqli';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'root';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "postgresql") {
|
||||
Start-Service postgresql-x64-9.5
|
||||
$env:PGUSER="postgres"
|
||||
$env:PGPASSWORD="Password12!"
|
||||
$Env:Path="C:\Program Files\PostgreSQL\9.6\bin\;$($Env:Path)"
|
||||
createdb phpbb_test
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\postgres';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'postgres';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "mariadb") {
|
||||
appveyor-retry cinst -y --force mariadb
|
||||
$env:MYSQL_PWD=""
|
||||
$cmd = '"C:\Program Files\MariaDB 10.2\bin\mysql" -e "create database phpbb_test;" --user=root'
|
||||
iex "& $cmd"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mysqli';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'root';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "sqlite") {
|
||||
# install sqlite
|
||||
appveyor-retry cinst -y sqlite
|
||||
sqlite3 c:\projects\test.db "create table aTable(field1 int); drop table aTable;"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\sqlite3';`n`$dbhost = 'c:\\projects\\test.db';`n`$dbport = '';`n`$dbname = '';`n`$dbuser = '';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
- cd c:\projects\phpbb\phpBB
|
||||
- php ..\composer.phar install
|
||||
- cd c:\projects\phpbb\tests
|
||||
- touch test_config.php
|
||||
- ps: $data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mssqlnative';`n`$dbhost = '.\\$env:db_version';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'sa';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "test_config.php"
|
||||
- choco install -y urlrewrite
|
||||
- ps: New-WebSite -Name 'phpBBTest' -PhysicalPath 'c:\projects\phpbb\phpBB' -Force
|
||||
- ps: Import-Module WebAdministration; Set-ItemProperty 'IIS:\Sites\phpBBTest' -name Bindings -value @{protocol='http';bindingInformation='*:80:phpbb.test'}
|
||||
- SET PATH=%systemroot%\system32\inetsrv\;%PATH%
|
||||
- echo Change default anonymous user AUTH to ApplicationPool
|
||||
- appcmd set config -section:anonymousAuthentication /username:"" --password
|
||||
- echo Setup FAST-CGI configuration
|
||||
|
@ -133,7 +133,7 @@ class phpbb_functional_extension_acp_test extends phpbb_functional_test_case
|
||||
|
||||
for ($i = 0; $i < $crawler->filter('dl')->count(); $i++)
|
||||
{
|
||||
$text = $crawler->filter('dl')->eq($i)->text();
|
||||
$text = trim($crawler->filter('dl')->eq($i)->text());
|
||||
|
||||
$match = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user