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 01076f6..430e83f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +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 - # lock distro so future defaults will not break the build dist: trusty @@ -18,8 +7,17 @@ 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 diff --git a/composer.json b/composer.json index 97b1e32..a59fbaf 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,9 @@ "autoload": { "psr-4": { "Clue\\React\\Stdio\\": "src/" } }, + "autoload-dev": { + "psr-4": { "Clue\\Tests\\React\\Stdio\\": "tests/" } + }, "require-dev": { "clue/arguments": "^2.0", "clue/commander": "^1.2", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 9e80822..6861c19 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,11 +1,6 @@ - + ./tests/ diff --git a/tests/FunctionalExampleTest.php b/tests/FunctionalExampleTest.php index fb8e101..af89495 100644 --- a/tests/FunctionalExampleTest.php +++ b/tests/FunctionalExampleTest.php @@ -1,5 +1,7 @@ getMockBuilder('CallableStub')->getMock(); + return $this->getMockBuilder('stdClass')->setMethods(array('__invoke'))->getMock(); } protected function expectPromiseResolve($promise) @@ -65,10 +67,3 @@ protected function expectPromiseReject($promise) return $promise; } } - -class CallableStub -{ - public function __invoke() - { - } -}