diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0925d33 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +/.gitattributes export-ignore +/.gitignore export-ignore +/.travis.yml export-ignore +/examples/ export-ignore +/phpunit.xml.dist export-ignore +/tests/ export-ignore diff --git a/.travis.yml b/.travis.yml index 9fd2b37..3b33f15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,5 @@ language: php -php: -# - 5.3 # requires old distro, see below - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - 7.2 - - 7.3 - - hhvm # ignore errors, see below - -sudo: false - # lock distro so new future defaults will not break the build dist: trusty @@ -20,8 +7,19 @@ matrix: include: - php: 5.3 dist: precise + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7.0 + - php: 7.1 + - php: 7.2 + - php: 7.3 + - php: 7.4 + - php: hhvm-3.18 allow_failures: - - php: hhvm + - php: hhvm-3.18 + +sudo: false install: - composer install --no-interaction diff --git a/composer.json b/composer.json index f74d048..e3d2e93 100644 --- a/composer.json +++ b/composer.json @@ -18,9 +18,12 @@ }, "require-dev": { "clue/block-react": "^1.1", - "phpunit/phpunit": "^5.0 || ^4.8" + "phpunit/phpunit": "^7.0 || ^5.0 || ^4.8" }, "autoload": { "psr-4": { "Clue\\React\\Zenity\\": "src/" } + }, + "autoload-dev": { + "psr-4": { "Clue\\Tests\\React\\Zenity\\": "tests/" } } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 248b760..b907049 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,6 @@ - + ./tests/ diff --git a/tests/Dialog/AbstractDialogTest.php b/tests/Dialog/AbstractDialogTest.php index e461595..8ebcb2e 100644 --- a/tests/Dialog/AbstractDialogTest.php +++ b/tests/Dialog/AbstractDialogTest.php @@ -1,6 +1,7 @@ getMockBuilder('CallableStub')->getMock(); + return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock(); } protected function expectPromiseResolve($promise) @@ -63,11 +65,3 @@ protected function expectPromiseReject($promise) return $promise; } } - -class CallableStub -{ - public function __invoke() - { - } -} - diff --git a/tests/Zen/BaseZenTest.php b/tests/Zen/BaseZenTest.php index 3d3aa8c..7202461 100644 --- a/tests/Zen/BaseZenTest.php +++ b/tests/Zen/BaseZenTest.php @@ -3,6 +3,7 @@ use Clue\React\Zenity\Zen\BaseZen; use React\EventLoop\Factory; use React\ChildProcess\Process; +use Clue\Tests\React\Zenity\TestCase; abstract class BaseZenTest extends TestCase { diff --git a/tests/Zen/FunctionalBaseZenTest.php b/tests/Zen/FunctionalBaseZenTest.php index 06236b7..ba2aa3d 100644 --- a/tests/Zen/FunctionalBaseZenTest.php +++ b/tests/Zen/FunctionalBaseZenTest.php @@ -4,6 +4,7 @@ use Clue\React\Zenity\Zen\BaseZen; use React\EventLoop\Factory; use React\ChildProcess\Process; +use Clue\Tests\React\Zenity\TestCase; class FunctionalBaseZenTest extends TestCase {