diff --git a/.circleci/config.yml b/.circleci/config.yml index 2edbd7d..dec189f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,6 @@ jobs: test-php74: docker: - image: circleci/php:7.4-cli - working_directory: ~/project steps: - checkout @@ -18,7 +17,32 @@ jobs: test-php80: docker: - image: circleci/php:8.0-cli + working_directory: ~/project + steps: + - checkout + + - run: + name: Run tests + command: | + composer update -n --prefer-dist --no-suggest + php vendor/bin/phpunit + + test-php81: + docker: + - image: cimg/php:8.1 + working_directory: ~/project + steps: + - checkout + - run: + name: Run tests + command: | + composer update -n --prefer-dist --no-suggest + php vendor/bin/phpunit + + test-php82: + docker: + - image: cimg/php:8.2 working_directory: ~/project steps: - checkout @@ -34,4 +58,6 @@ workflows: test: jobs: - test-php74 - - test-php80 \ No newline at end of file + - test-php80 + - test-php81 + - test-php82 \ No newline at end of file diff --git a/.phpunit.result.cache b/.phpunit.result.cache new file mode 100644 index 0000000..a95a7a4 --- /dev/null +++ b/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"Drift\\React\\Tests\\SleepTest::testIt":4},"times":{"Drift\\React\\Tests\\MimeContentTypeTest::testItResolvesWithMimeType":0.048,"Drift\\React\\Tests\\MimeContentTypeTest::testIfRejectsOnFailure with data set #0":0.024,"Drift\\React\\Tests\\MimeContentTypeTest::testIfRejectsOnFailure with data set #1":0.015,"Drift\\React\\Tests\\SleepTest::testIt":0}} \ No newline at end of file diff --git a/composer.json b/composer.json index 9b66ade..3d1b828 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "require": { "php": "^7.4 || ^8.0", "react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3.5", - "react/promise": "^2.7 || ^1.2.1", + "react/promise": "^3", "react/child-process": "^0.6", "react/promise-timer": "^1.5", "react/stream": "^1.0" diff --git a/tests/SleepTest.php b/tests/SleepTest.php index 26ee095..4cae689 100644 --- a/tests/SleepTest.php +++ b/tests/SleepTest.php @@ -19,7 +19,7 @@ function testIt() $loop = Factory::create(); $elements = []; - $promiseXZ = resolve() + $promiseXZ = resolve(null) ->then(function() use (&$elements){ $elements[] = 'X'; }) @@ -30,7 +30,7 @@ function testIt() $elements[] = 'Z'; }); - $promiseY = resolve() + $promiseY = resolve(null) ->then(function() use ($loop) { return React\sleep(1, $loop); }) diff --git a/tests/UsleepTest.php b/tests/UsleepTest.php index 15b0b54..7d975dc 100644 --- a/tests/UsleepTest.php +++ b/tests/UsleepTest.php @@ -19,7 +19,7 @@ function testIt() $loop = Factory::create(); $elements = []; - $promiseXZ = resolve() + $promiseXZ = resolve(null) ->then(function() use (&$elements){ $elements[] = 'X'; }) @@ -30,7 +30,7 @@ function testIt() $elements[] = 'Z'; }); - $promiseY = resolve() + $promiseY = resolve(null) ->then(function() use ($loop) { return React\usleep(100, $loop); })