Use common code to bootstrap tests (#443)

pull/444/head
Michele Locati 2021-09-28 12:27:17 +02:00 committed by GitHub
parent e05d5346d5
commit f81f0cd1a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 31 additions and 98 deletions

View File

@ -0,0 +1,18 @@
<?php
error_reporting(-1);
set_error_handler(
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);

View File

@ -0,0 +1,2 @@
set -o nounset
set -o errexit

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
set -o errexit . "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/_bootstrap.sh"
set -o nounset
if test -z "$(php --ri blackfire | grep 'Blackfire => enabled')"; then if test -z "$(php --ri blackfire | grep 'Blackfire => enabled')"; then
echo 'Blackfire PHP Probe is disabled' >&2 echo 'Blackfire PHP Probe is disabled' >&2

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
set_error_handler( require_once __DIR__ . '/_bootstrap.php';
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);
$requiredHandlers = array_map('strtolower', [ $requiredHandlers = array_map('strtolower', [
'db4', 'db4',

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
set -o errexit . "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/_bootstrap.sh"
set -o nounset
rc=0 rc=0
if php --ri sockets >/dev/null 2>/dev/null; then if php --ri sockets >/dev/null 2>/dev/null; then

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
set_error_handler( require_once __DIR__ . '/_bootstrap.php';
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);
$imageWidth = 8; $imageWidth = 8;
$imageHeight = 16; $imageHeight = 16;

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
set_error_handler( require_once __DIR__ . '/_bootstrap.php';
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);
$requiredFormats = array_map('strtoupper', [ $requiredFormats = array_map('strtoupper', [
'BMP', 'BMP',

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
set -o errexit . "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/_bootstrap.sh"
set -o nounset
rc=0 rc=0
MODULE_CONFIGURATION="$(php --ri memcached)" MODULE_CONFIGURATION="$(php --ri memcached)"

View File

@ -1,22 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
error_reporting(-1); require_once __DIR__ . '/_bootstrap.php';
set_error_handler(
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);
try { try {
new PDO('sqlsrv:server=localhost; Authentication=SqlPassword; ConnectRetryCount=0; Database=example; LoginTimeout=1', 'userName', 'password'); new PDO('sqlsrv:server=localhost; Authentication=SqlPassword; ConnectRetryCount=0; Database=example; LoginTimeout=1', 'userName', 'password');

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
set_error_handler( require_once __DIR__ . '/_bootstrap.php';
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);
$rc = 0; $rc = 0;
foreach ([false => 'PHP module', true => 'Zend extension'] as $type => $typeName) { foreach ([false => 'PHP module', true => 'Zend extension'] as $type => $typeName) {

View File

@ -1,22 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
error_reporting(-1); require_once __DIR__ . '/_bootstrap.php';
set_error_handler(
static function ($errno, $errstr, $errfile, $errline) {
$msg = "Error {$errno}: {$errstr}\n";
if ($errfile) {
$msg .= "File: {$errfile}\n";
if ($errline) {
$msg .= "Line: {$errline}\n";
}
}
fwrite(STDERR, $msg);
exit(1);
},
-1
);
sqlsrv_connect( sqlsrv_connect(
'localhost, 50000', 'localhost, 50000',

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
set -o errexit . "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/_bootstrap.sh"
set -o nounset
rc=0 rc=0
if test -z "$(php --ri stomp | grep 'SSL Support => enabled')"; then if test -z "$(php --ri stomp | grep 'SSL Support => enabled')"; then

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
set -o errexit . "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/_bootstrap.sh"
set -o nounset
rc=0 rc=0
if php --ri igbinary >/dev/null 2>/dev/null; then if php --ri igbinary >/dev/null 2>/dev/null; then