diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index 00b7ba8..10305f8 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -32,14 +32,29 @@ jobs: php-version: ${{ matrix.php }} extensions: json, mbstring - - name: Install Dependencies - run: composer install + - name: Install WP PHPUnit Dependencies + run: | + composer install --ignore-platform-reqs + composer require wp-phpunit/wp-phpunit \ + yoast/phpunit-polyfills \ + phpunit/phpunit:^9.6 \ + wp-phpunit/wp-phpunit \ + + - name: Run PHPUnit Tests w/ Docker. + run: composer run-phpunit -- -- --coverage-text + + - name: Install WPBrowser Dependencies + run: | + composer install --ignore-platform-reqs + composer require codeception/module-asserts:* \ + codeception/util-universalframework:* \ + codeception/module-rest:* \ + lucatume/wp-browser:^3.1 --ignore-platform-reqs - name: Run Codeception Tests w/ Docker. run: composer run-codeception -- -- --coverage --coverage-xml - - name: Run PHPUnit Tests w/ Docker. - run: composer run-phpunit -- -- --coverage-text + - name: Push Codecoverage to Coveralls.io env: diff --git a/composer.json b/composer.json index 2300567..f8c4ac4 100644 --- a/composer.json +++ b/composer.json @@ -27,13 +27,6 @@ "squizlabs/php_codesniffer": "^3.5", "automattic/vipwpcs": "^2.3", "wp-coding-standards/wpcs": "^2.3", - "wp-phpunit/wp-phpunit": "^6.3", - "yoast/phpunit-polyfills": "^2.0", - "phpunit/phpunit": "^9.6", - "codeception/module-asserts": "*", - "codeception/util-universalframework": "*", - "codeception/module-rest": "*", - "lucatume/wp-browser": "^4.1", "php-coveralls/php-coveralls": "2.4.3" }, "scripts": { @@ -54,7 +47,9 @@ "codeception/util-universalframework": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLTestcase to work.", "codeception/module-rest": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLTestcase to work.", "lucatume/wp-browser": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLTestcase to work.", - "wp-phpunit/wp-phpunit": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLUnitTestcase to work." + "phpunit/phpunit": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLUnitTestcase to work.", + "wp-phpunit/wp-phpunit": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLUnitTestcase to work.", + "yoast/phpunit-polyfills": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLUnitTestcase to work." }, "config": { "allow-plugins": { diff --git a/src/TestCase/WPGraphQLTestCommon.php b/src/TestCase/WPGraphQLTestCommon.php index 73eff47..ca8dffa 100644 --- a/src/TestCase/WPGraphQLTestCommon.php +++ b/src/TestCase/WPGraphQLTestCommon.php @@ -836,24 +836,6 @@ protected static function endsWith( $needle, $haystack ) { return ( substr( $haystack, -$len ) === $needle ); } - /** - * Wrapper for IsTrue constraint. - * - * @return IsTrue - */ - public static function isTrue(): IsTrue { - return new IsTrue; - } - - /** - * Wrapper for IsEmpty constraint. - * - * @return IsEmpty - */ - public static function isEmpty(): IsEmpty { - return new IsEmpty; - } - /** * Wrapper for IsEqual constraint. * @@ -875,22 +857,4 @@ public static function isEqual( $value ): IsEqual { public static function contains( $value ): TraversableContainsIdentical { return new TraversableContainsIdentical( $value ); } - - /** - * Wrapper for IsNull constraint. - * - * @return IsNull - */ - public static function isNull(): IsNull { - return new IsNull; - } - - /** - * Wrapper for LogicalNot constraint. - * - * @return LogicalNot - */ - public static function logicalNot( Constraint $last_constraint ): LogicalNot { - return new LogicalNot( $last_constraint ); - } }