Skip to content

Commit

Permalink
devops: unneeded dependencies removed
Browse files Browse the repository at this point in the history
  • Loading branch information
kidunot89 committed Apr 25, 2024
1 parent eba8eba commit e9d179c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 48 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 3 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
36 changes: 0 additions & 36 deletions src/TestCase/WPGraphQLTestCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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 );
}
}

0 comments on commit e9d179c

Please sign in to comment.