mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-09 15:47:25 +02:00
Run CSSTidy tests on CI (#338)
* Run CSSTidy tests on CI * update dirname * use compopser instead of git clone * use composer * use test-settings.sample.php * enable ext-intl * disable Net_IDNA2
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__.'/../vendor/autoload.php';
|
||||
|
||||
if (!defined('HTMLPurifierTest')) {
|
||||
echo "Invalid entry point\n";
|
||||
exit;
|
||||
@@ -27,8 +29,6 @@ $GLOBALS['HTMLPurifierTest']['PHPT'] = true; // do PHPT tests
|
||||
$GLOBALS['HTMLPurifierTest']['PH5P'] = class_exists('DOMDocument');
|
||||
|
||||
// default library settings
|
||||
$simpletest_location = 'simpletest/'; // reasonable guess
|
||||
$csstidy_location = false;
|
||||
$versions_to_test = array();
|
||||
$php = 'php';
|
||||
$phpv = 'phpv';
|
||||
@@ -40,20 +40,6 @@ else {
|
||||
throw new Exception('Please create a test-settings.php file by copying test-settings.sample.php and configuring accordingly');
|
||||
}
|
||||
|
||||
// load SimpleTest
|
||||
require_once $simpletest_location . 'unit_tester.php';
|
||||
require_once $simpletest_location . 'reporter.php';
|
||||
require_once $simpletest_location . 'mock_objects.php';
|
||||
require_once $simpletest_location . 'xml.php';
|
||||
require_once $simpletest_location . 'remote.php';
|
||||
|
||||
// load CSS Tidy
|
||||
if ($csstidy_location !== false) {
|
||||
$old = error_reporting(E_ALL);
|
||||
require $csstidy_location . 'class.csstidy.php';
|
||||
error_reporting($old);
|
||||
}
|
||||
|
||||
// load PEAR to include path
|
||||
if ( is_string($GLOBALS['HTMLPurifierTest']['PEAR']) ) {
|
||||
// if PEAR is true, there's no need to add it to the path
|
||||
|
@@ -18,9 +18,7 @@ switch ($AC['type']) {
|
||||
$test_dirs[] = 'HTMLPurifier';
|
||||
$test_files[] = 'HTMLPurifierTest.php';
|
||||
$test_dirs_exclude['HTMLPurifier/Filter/ExtractStyleBlocksTest.php'] = true;
|
||||
if ($csstidy_location) {
|
||||
$test_files[] = 'HTMLPurifier/Filter/ExtractStyleBlocksTest.php';
|
||||
}
|
||||
$test_files[] = 'HTMLPurifier/Filter/ExtractStyleBlocksTest.php';
|
||||
if ($break) break;
|
||||
case 'configdoc':
|
||||
if (version_compare(PHP_VERSION, '5.2', '>=')) {
|
||||
|
Reference in New Issue
Block a user