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
set -o errexit
set -o nounset
. "$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/_bootstrap.sh"
if test -z "$(php --ri blackfire | grep 'Blackfire => enabled')"; then
echo 'Blackfire PHP Probe is disabled' >&2

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php
<?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
);
require_once __DIR__ . '/_bootstrap.php';
$requiredHandlers = array_map('strtolower', [
'db4',

View File

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

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php
<?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
);
require_once __DIR__ . '/_bootstrap.php';
$imageWidth = 8;
$imageHeight = 16;

View File

@ -1,20 +1,7 @@
#!/usr/bin/env php
<?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
);
require_once __DIR__ . '/_bootstrap.php';
$requiredFormats = array_map('strtoupper', [
'BMP',

View File

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

View File

@ -1,22 +1,7 @@
#!/usr/bin/env php
<?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
);
require_once __DIR__ . '/_bootstrap.php';
try {
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
<?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
);
require_once __DIR__ . '/_bootstrap.php';
$rc = 0;
foreach ([false => 'PHP module', true => 'Zend extension'] as $type => $typeName) {

View File

@ -1,22 +1,7 @@
#!/usr/bin/env php
<?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
);
require_once __DIR__ . '/_bootstrap.php';
sqlsrv_connect(
'localhost, 50000',

View File

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

View File

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