Remove phpunit.xml

Use defaults from new workflows.
This commit is contained in:
Eric Lippmann 2025-10-21 16:42:48 +02:00
parent e7f0b449bb
commit 4c430f6424
5 changed files with 0 additions and 162 deletions

View file

@ -1,29 +0,0 @@
<?php
namespace Icinga\Module\Businessprocess\Test;
use Icinga\Application\Cli;
class Bootstrap
{
public static function cli($basedir = null)
{
error_reporting(E_ALL | E_STRICT);
if ($basedir === null) {
$basedir = dirname(dirname(dirname(__DIR__)));
}
$testsDir = $basedir . '/test';
require_once 'Icinga/Application/Cli.php';
if (array_key_exists('ICINGAWEB_CONFIGDIR', $_SERVER)) {
$configDir = $_SERVER['ICINGAWEB_CONFIGDIR'];
} else {
$configDir = $testsDir . '/config';
}
Cli::start($testsDir, $configDir)
->getModuleManager()
->loadModule('ipl', $basedir . '/vendor/ipl')
->loadModule('businessprocess', $basedir);
}
}

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="test/bootstrap.php"
>
<testsuites>
<testsuite name="Businessprocess PHP Unit tests">
<directory suffix=".php">test/php</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">library/Businessprocess</directory>
<exclude>
<directory suffix=".php">library/Businessprocess/Director</directory>
</exclude>
<exclude>
<directory suffix=".php">library/Businessprocess/ProvidedHook</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

View file

@ -1,16 +0,0 @@
<?php
use Icinga\Module\Businessprocess\Test\Bootstrap;
call_user_func(function () {
$basedir = dirname(__DIR__);
if (! class_exists('PHPUnit_Framework_TestCase')) {
require_once __DIR__ . '/phpunit-compat.php';
}
$include_path = $basedir . '/vendor' . PATH_SEPARATOR . ini_get('include_path');
ini_set('include_path', $include_path);
require_once $basedir . '/library/Businessprocess/Test/Bootstrap.php';
Bootstrap::cli($basedir);
});

View file

@ -1,7 +0,0 @@
<?php
use PHPUnit\Framework\TestCase;
class PHPUnit_Framework_TestCase extends TestCase // phpcs:ignore
{
}

View file

@ -1,82 +0,0 @@
#!/bin/bash
set -ex
MODULE_HOME=${MODULE_HOME:="$(dirname "$(readlink -f $(dirname "$0"))")"}
PHP_VERSION="$(php -r 'echo phpversion();')"
# see also .travis.yml
ICINGAWEB_VERSION=${ICINGAWEB_VERSION:=2.5.1}
ICINGAWEB_GITREF=${ICINGAWEB_GITREF:=}
IPL_VERSION=${IPL_VERSION:=0.1.1}
PHPCS_VERSION=${PHPCS_VERSION:=2.9.1}
if [ "$PHP_VERSION" '<' 5.6.0 ]; then
PHPUNIT_VERSION=${PHPUNIT_VERSION:=4.8}
else
PHPUNIT_VERSION=${PHPUNIT_VERSION:=5.7}
fi
cd ${MODULE_HOME}
test -d vendor || mkdir vendor
cd vendor/
# icingaweb2
if [ -n "$ICINGAWEB_GITREF" ]; then
icingaweb_path="icingaweb2"
test ! -L "$icingaweb_path" || rm "$icingaweb_path"
if [ ! -d "$icingaweb_path" ]; then
git clone https://github.com/Icinga/icingaweb2.git "$icingaweb_path"
fi
(
set -e
cd "$icingaweb_path"
git fetch -p
git checkout -f "$ICINGAWEB_GITREF"
)
else
icingaweb_path="icingaweb2-${ICINGAWEB_VERSION}"
if [ ! -e "${icingaweb_path}".tar.gz ]; then
wget -O "${icingaweb_path}".tar.gz https://github.com/Icinga/icingaweb2/archive/v"${ICINGAWEB_VERSION}".tar.gz
fi
if [ ! -d "${icingaweb_path}" ]; then
tar xf "${icingaweb_path}".tar.gz
fi
rm -f icingaweb2
ln -svf "${icingaweb_path}" icingaweb2
fi
ln -svf "${icingaweb_path}"/library/Icinga
ln -svf "${icingaweb_path}"/library/vendor/Zend
# ipl
ipl_path="ipl"
if [ ! -d "$ipl_path" ]; then
git clone https://github.com/Icinga/icingaweb2-module-ipl.git "$ipl_path"
fi
(
set -e
cd "$ipl_path"
git fetch -p
git checkout -f "stable/$IPL_VERSION"
)
# phpunit
phpunit_path="phpunit-${PHPUNIT_VERSION}"
if [ ! -e "${phpunit_path}".phar ]; then
wget -O "${phpunit_path}".phar https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar
fi
ln -svf "${phpunit_path}".phar phpunit.phar
# phpcs
phpcs_path="phpcs-${PHPCS_VERSION}"
if [ ! -e "${phpcs_path}".phar ]; then
wget -O "${phpcs_path}".phar \
https://github.com/squizlabs/PHP_CodeSniffer/releases/download/${PHPCS_VERSION}/phpcs.phar
fi
ln -svf "${phpcs_path}".phar phpcs.phar