diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml
new file mode 100644
index 0000000..3bd4e08
--- /dev/null
+++ b/.github/workflows/main.yaml
@@ -0,0 +1,49 @@
+name: Main
+
+on:
+ workflow_dispatch:
+ push:
+ branches:
+ - main
+ - master
+ - release/**
+ pull_request:
+ branches:
+ - main
+ - master
+ - release/**
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ run:
+ runs-on: ${{ matrix.operating-system }}
+ strategy:
+ matrix:
+ operating-system: ['ubuntu-latest', 'macos-latest'] #, 'windows-latest']
+ php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
+ steps:
+ - name: Get source code
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php-versions }}
+ coverage: none
+ ini-values: post_max_size=256M, max_execution_time=180
+ - run: sudo pear list
+ - run: sudo pear channel-update pear.php.net
+ - run: sudo pear upgrade --force pear/pear
+ - run: sudo pear list
+ - run: sudo pear install --force package.xml
+ - run: sudo pear list
+ - run: sudo pear package
+ - run: sudo pear package-validate
+ - run: sudo pear install --force *.tgz
+ - run: sudo pear list
+ - run: composer install
+ - run: ./vendor/bin/phpunit tests
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 083af02..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-language: php
-sudo: false
-php:
- - 5.6
- - 7.0
- - 7.1
- - 7.2
- - 7.3
- - 7.4
-# Disable xdebug for PHP >= 7.3
-# https://stackoverflow.com/questions/65172031/vendor-bin-phpunit-exited-with-2
-before_script:
- - phpenv config-rm xdebug.ini
-script:
- - pear list
- - pear channel-update pear.php.net
- - pear upgrade --force pear/pear
- - pear list
- - pear install --force package.xml
- - pear list
- - pear package
- - pear package-validate
- - pear install --force *.tgz
- - pear list
- - composer install
- - ./vendor/bin/phpunit -c phpunit.xml.dist
diff --git a/composer.json b/composer.json
index fd97b87..4f5ded2 100644
--- a/composer.json
+++ b/composer.json
@@ -47,6 +47,6 @@
"pear/pear-core-minimal": "^1.10.1"
},
"require-dev": {
- "phpunit/phpunit": "^4"
+ "yoast/phpunit-polyfills": "^2.0"
}
}
diff --git a/package.xml b/package.xml
index 970e7dd..ce236f9 100644
--- a/package.xml
+++ b/package.xml
@@ -60,7 +60,6 @@ There are two classes to use for templating. HTML_Template_IT is used for basic
-
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
deleted file mode 100644
index 31c5c11..0000000
--- a/phpunit.xml.dist
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- tests/
-
-
-
-
-
- HTML/
-
-
-
-
-
-
-
-
-
diff --git a/tests/AllTests.php b/tests/AllTests.php
deleted file mode 100644
index 0059556..0000000
--- a/tests/AllTests.php
+++ /dev/null
@@ -1,34 +0,0 @@
-addTestSuite('ITTest');
- $suite->addTestSuite('ITXTest');
-
- return $suite;
- }
-}
-
-if (PHPUnit_MAIN_METHOD == 'HTML_Template_IT_AllTests::main') {
- HTML_Template_IT_AllTests::main();
-}
-?>
diff --git a/tests/ITTest.php b/tests/ITTest.php
index ac95752..2e8616f 100644
--- a/tests/ITTest.php
+++ b/tests/ITTest.php
@@ -1,7 +1,15 @@
tpl = new HTML_Template_IT(dirname(__FILE__) . '/templates');
}
- function tearDown()
+ protected function tear_down()
{
unset($this->tpl);
}
diff --git a/tests/ITXTest.php b/tests/ITXTest.php
index 87f19c2..f5a728c 100644
--- a/tests/ITXTest.php
+++ b/tests/ITXTest.php
@@ -23,7 +23,7 @@ static function _numberFormatCallback($float, $decimals)
class ITXTest extends ITTest
{
- function setUp()
+ function set_up()
{
$this->tpl = new HTML_Template_ITX(dirname(__FILE__) . '/templates');
}