From f7a5a8872fe9e044402ed56c0d44939dafe43d3a Mon Sep 17 00:00:00 2001 From: Luca Tumedei Date: Thu, 1 Aug 2024 09:22:00 +0200 Subject: [PATCH] test(unit) break down into groups, cache Chromedriver --- .github/workflows/test.yaml | 29 +++- .../_generated/AcceptanceTesterActions.php | 2 +- .../_generated/ClimoduleTesterActions.php | 160 +++++++++--------- .../_generated/FunctionalTesterActions.php | 6 +- .../WPLoaderArbitraryPluginLocationTest.php | 2 + .../WPLoaderArbitraryThemeLocationTest.php | 2 + .../WPBrowser/Module/WPLoaderTest.php | 1 + .../WPBrowser/Module/WPTestCaseStrictTest.php | 2 + 8 files changed, 118 insertions(+), 86 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 01cafa390..6e5ce35da 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -37,7 +37,9 @@ jobs: - climodule - functional - muloader - - unit + - unit --skip-group=slow + - unit --group=isolated-1 + - unit --group=isolated-2 - webdriver - wpcli_module - wploader_multisite @@ -70,10 +72,33 @@ jobs: restore-keys: | ${{ runner.os }}-composer- + - name: Get Chrome version + id: chrome-version + run: | + echo "version=$(/usr/bin/google-chrome --version)" >> $GITHUB_OUTPUT + + - name: Get the vendor/bin directory path + id: vendor-bin-dir + run: | + echo "dir=${{ github.workspace }}/vendor/bin" >> $GITHUB_OUTPUT + + - name: Ensure the vendor/bin directory exists + run: mkdir -p ${{ steps.chromedriver-cache.outputs.dir }} + + - name: Restore vendor/bin from cache + uses: actions/cache@v3 + id: vendor-bin-dir-cache + with: + path: ${{ steps.vendor-bin-dir.outputs.dir }} + key: ${{ runner.os }}-chromedriver-${{ steps.chrome-version.outputs.version }} + restore-keys: | + ${{ runner.os }}-chromedriver- + - name: Install dependencies run: composer update - - name: Update ChromeDriver + - name: Update ChromeDriver if required + if: steps.vendor-bin-dir-cache.outputs.cache-hit != 'true' run: vendor/bin/codecept chromedriver:update --binary /usr/bin/google-chrome - name: Create var/wordpress directory diff --git a/tests/_support/_generated/AcceptanceTesterActions.php b/tests/_support/_generated/AcceptanceTesterActions.php index 5989f54df..d579db888 100644 --- a/tests/_support/_generated/AcceptanceTesterActions.php +++ b/tests/_support/_generated/AcceptanceTesterActions.php @@ -1,4 +1,4 @@ -amOnPage('/'); @@ -5367,7 +5367,7 @@ public function amOnPage(string $page): void { * * Note that if the locator matches a button of type `submit`, the form will be submitted. * - * ``` php + * ```php * click('Logout'); @@ -5398,7 +5398,7 @@ public function click($link, $context = NULL): void { * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * - * ``` php + * ```php * see('Logout'); // I can suppose user is logged in * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page @@ -5435,7 +5435,7 @@ public function see(string $text, $selector = NULL): void { * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * - * ``` php + * ```php * see('Logout'); // I can suppose user is logged in * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page @@ -5542,7 +5542,7 @@ public function cantSee(string $text, $selector = NULL): void { * Checks that the current page contains the given string in its * raw source code. * - * ``` php + * ```php * seeInSource('

Green eggs & ham

'); * ``` @@ -5558,7 +5558,7 @@ public function seeInSource(string $raw): void { * Checks that the current page contains the given string in its * raw source code. * - * ``` php + * ```php * seeInSource('

Green eggs & ham

'); * ``` @@ -5608,7 +5608,7 @@ public function cantSeeInSource(string $raw): void { * Checks that there's a link with the specified text. * Give a full URL as the second parameter to match links with that exact URL. * - * ``` php + * ```php * seeLink('Logout'); // matches Logout * $I->seeLink('Logout','/logout'); // matches Logout @@ -5625,7 +5625,7 @@ public function seeLink(string $text, ?string $url = NULL): void { * Checks that there's a link with the specified text. * Give a full URL as the second parameter to match links with that exact URL. * - * ``` php + * ```php * seeLink('Logout'); // matches Logout * $I->seeLink('Logout','/logout'); // matches Logout @@ -5643,7 +5643,7 @@ public function canSeeLink(string $text, ?string $url = NULL): void { * Checks that the page doesn't contain a link with the given string. * If the second parameter is given, only links with a matching "href" attribute will be checked. * - * ``` php + * ```php * dontSeeLink('Logout'); // I suppose user is not logged in * $I->dontSeeLink('Checkout now', '/store/cart.php'); @@ -5660,7 +5660,7 @@ public function dontSeeLink(string $text, string $url = ""): void { * Checks that the page doesn't contain a link with the given string. * If the second parameter is given, only links with a matching "href" attribute will be checked. * - * ``` php + * ```php * dontSeeLink('Logout'); // I suppose user is not logged in * $I->dontSeeLink('Checkout now', '/store/cart.php'); @@ -5677,7 +5677,7 @@ public function cantSeeLink(string $text, string $url = ""): void { * * Checks that current URI contains the given string. * - * ``` php + * ```php * seeInCurrentUrl('home'); @@ -5695,7 +5695,7 @@ public function seeInCurrentUrl(string $uri): void { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that current URI contains the given string. * - * ``` php + * ```php * seeInCurrentUrl('home'); @@ -5714,7 +5714,7 @@ public function canSeeInCurrentUrl(string $uri): void { * * Checks that the current URI doesn't contain the given string. * - * ``` php + * ```php * dontSeeInCurrentUrl('/users/'); * ``` @@ -5729,7 +5729,7 @@ public function dontSeeInCurrentUrl(string $uri): void { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that the current URI doesn't contain the given string. * - * ``` php + * ```php * dontSeeInCurrentUrl('/users/'); * ``` @@ -5746,7 +5746,7 @@ public function cantSeeInCurrentUrl(string $uri): void { * Checks that the current URL is equal to the given string. * Unlike `seeInCurrentUrl`, this only matches the full URL. * - * ``` php + * ```php * seeCurrentUrlEquals('/'); @@ -5763,7 +5763,7 @@ public function seeCurrentUrlEquals(string $uri): void { * Checks that the current URL is equal to the given string. * Unlike `seeInCurrentUrl`, this only matches the full URL. * - * ``` php + * ```php * seeCurrentUrlEquals('/'); @@ -5781,7 +5781,7 @@ public function canSeeCurrentUrlEquals(string $uri): void { * Checks that the current URL doesn't equal the given string. * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. * - * ``` php + * ```php * dontSeeCurrentUrlEquals('/'); @@ -5798,7 +5798,7 @@ public function dontSeeCurrentUrlEquals(string $uri): void { * Checks that the current URL doesn't equal the given string. * Unlike `dontSeeInCurrentUrl`, this only matches the full URL. * - * ``` php + * ```php * dontSeeCurrentUrlEquals('/'); @@ -5815,7 +5815,7 @@ public function cantSeeCurrentUrlEquals(string $uri): void { * * Checks that the current URL matches the given regular expression. * - * ``` php + * ```php * seeCurrentUrlMatches('~^/users/(\d+)~'); @@ -5831,7 +5831,7 @@ public function seeCurrentUrlMatches(string $uri): void { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that the current URL matches the given regular expression. * - * ``` php + * ```php * seeCurrentUrlMatches('~^/users/(\d+)~'); @@ -5848,7 +5848,7 @@ public function canSeeCurrentUrlMatches(string $uri): void { * * Checks that current url doesn't match the given regular expression. * - * ``` php + * ```php * dontSeeCurrentUrlMatches('~^/users/(\d+)~'); @@ -5864,7 +5864,7 @@ public function dontSeeCurrentUrlMatches(string $uri): void { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that current url doesn't match the given regular expression. * - * ``` php + * ```php * dontSeeCurrentUrlMatches('~^/users/(\d+)~'); @@ -5882,7 +5882,7 @@ public function cantSeeCurrentUrlMatches(string $uri): void { * Executes the given regular expression against the current URI and returns the first capturing group. * If no parameters are provided, the full URI is returned. * - * ``` php + * ```php * grabFromCurrentUrl('~^/user/(\d+)/~'); * $uri = $I->grabFromCurrentUrl(); @@ -5899,7 +5899,7 @@ public function grabFromCurrentUrl(?string $uri = NULL): mixed { * * Checks that the specified checkbox is checked. * - * ``` php + * ```php * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. @@ -5916,7 +5916,7 @@ public function seeCheckboxIsChecked($checkbox): void { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that the specified checkbox is checked. * - * ``` php + * ```php * seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form. @@ -5934,7 +5934,7 @@ public function canSeeCheckboxIsChecked($checkbox): void { * * Check that the specified checkbox is unchecked. * - * ``` php + * ```php * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. @@ -5950,7 +5950,7 @@ public function dontSeeCheckboxIsChecked($checkbox): void { * [!] Conditional Assertion: Test won't be stopped on fail * Check that the specified checkbox is unchecked. * - * ``` php + * ```php * dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form. @@ -5968,7 +5968,7 @@ public function cantSeeCheckboxIsChecked($checkbox): void { * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value. * Fields are matched by label text, the "name" attribute, CSS, or XPath. * - * ``` php + * ```php * seeInField('Body','Type your comment here'); * $I->seeInField('form textarea[name=body]','Type your comment here'); @@ -5991,7 +5991,7 @@ public function seeInField($field, $value): void { * Checks that the given input field or textarea *equals* (i.e. not just contains) the given value. * Fields are matched by label text, the "name" attribute, CSS, or XPath. * - * ``` php + * ```php * seeInField('Body','Type your comment here'); * $I->seeInField('form textarea[name=body]','Type your comment here'); @@ -6015,7 +6015,7 @@ public function canSeeInField($field, $value): void { * Checks that an input field or textarea doesn't contain the given value. * For fuzzy locators, the field is matched by label text, CSS and XPath. * - * ``` php + * ```php * dontSeeInField('Body','Type your comment here'); * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); @@ -6037,7 +6037,7 @@ public function dontSeeInField($field, $value): void { * Checks that an input field or textarea doesn't contain the given value. * For fuzzy locators, the field is matched by label text, CSS and XPath. * - * ``` php + * ```php * dontSeeInField('Body','Type your comment here'); * $I->dontSeeInField('form textarea[name=body]','Type your comment here'); @@ -6060,7 +6060,7 @@ public function cantSeeInField($field, $value): void { * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. * - * ``` php + * ```php * seeInFormFields('form[name=myform]', [ * 'input1' => 'value', @@ -6071,7 +6071,7 @@ public function cantSeeInField($field, $value): void { * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: * - * ``` php + * ```php * seeInFormFields('.form-class', [ * 'multiselect' => [ @@ -6087,7 +6087,7 @@ public function cantSeeInField($field, $value): void { * * Additionally, checkbox values can be checked with a boolean. * - * ``` php + * ```php * seeInFormFields('#form-id', [ * 'checkbox1' => true, // passes if checked @@ -6097,7 +6097,7 @@ public function cantSeeInField($field, $value): void { * * Pair this with submitForm for quick testing magic. * - * ``` php + * ```php * 'value', @@ -6121,7 +6121,7 @@ public function seeInFormFields($formSelector, array $params): void { * Checks if the array of form parameters (name => value) are set on the form matched with the * passed selector. * - * ``` php + * ```php * seeInFormFields('form[name=myform]', [ * 'input1' => 'value', @@ -6132,7 +6132,7 @@ public function seeInFormFields($formSelector, array $params): void { * For multi-select elements, or to check values of multiple elements with the same name, an * array may be passed: * - * ``` php + * ```php * seeInFormFields('.form-class', [ * 'multiselect' => [ @@ -6148,7 +6148,7 @@ public function seeInFormFields($formSelector, array $params): void { * * Additionally, checkbox values can be checked with a boolean. * - * ``` php + * ```php * seeInFormFields('#form-id', [ * 'checkbox1' => true, // passes if checked @@ -6158,7 +6158,7 @@ public function seeInFormFields($formSelector, array $params): void { * * Pair this with submitForm for quick testing magic. * - * ``` php + * ```php * 'value', @@ -6183,7 +6183,7 @@ public function canSeeInFormFields($formSelector, array $params): void { * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. * - * ``` php + * ```php * dontSeeInFormFields('form[name=myform]', [ * 'input1' => 'non-existent value', @@ -6194,7 +6194,7 @@ public function canSeeInFormFields($formSelector, array $params): void { * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: * - * ``` php + * ```php * dontSeeInFormFields('.form-class', [ * 'fieldName' => [ @@ -6206,7 +6206,7 @@ public function canSeeInFormFields($formSelector, array $params): void { * * Additionally, checkbox values can be checked with a boolean. * - * ``` php + * ```php * dontSeeInFormFields('#form-id', [ * 'checkbox1' => true, // fails if checked @@ -6225,7 +6225,7 @@ public function dontSeeInFormFields($formSelector, array $params): void { * Checks if the array of form parameters (name => value) are not set on the form matched with * the passed selector. * - * ``` php + * ```php * dontSeeInFormFields('form[name=myform]', [ * 'input1' => 'non-existent value', @@ -6236,7 +6236,7 @@ public function dontSeeInFormFields($formSelector, array $params): void { * To check that an element hasn't been assigned any one of many values, an array can be passed * as the value: * - * ``` php + * ```php * dontSeeInFormFields('.form-class', [ * 'fieldName' => [ @@ -6248,7 +6248,7 @@ public function dontSeeInFormFields($formSelector, array $params): void { * * Additionally, checkbox values can be checked with a boolean. * - * ``` php + * ```php * dontSeeInFormFields('#form-id', [ * 'checkbox1' => true, // fails if checked @@ -6292,7 +6292,7 @@ public function cantSeeInFormFields($formSelector, array $params): void { * * Examples: * - * ``` php + * ```php * submitForm('#login', [ * 'login' => 'davert', @@ -6329,7 +6329,7 @@ public function cantSeeInFormFields($formSelector, array $params): void { * * You could write the following to submit it: * - * ``` php + * ```php * submitForm( * '#userForm', @@ -6369,7 +6369,7 @@ public function cantSeeInFormFields($formSelector, array $params): void { * This function works well when paired with `seeInFormFields()` * for quickly testing CRUD interfaces and form validation logic. * - * ``` php + * ```php * 'value', @@ -6387,7 +6387,7 @@ public function cantSeeInFormFields($formSelector, array $params): void { * you can use either the string value or boolean `true`/`false` which will * be replaced by the checkbox's value in the DOM. * - * ``` php + * ```php * submitForm('#my-form', [ * 'field1' => 'value', @@ -6447,7 +6447,7 @@ public function submitForm($selector, array $params, ?string $button = NULL): vo * * Fills a text field or textarea with the given string. * - * ``` php + * ```php * fillField("//input[@type='text']", "Hello World!"); * $I->fillField(['name' => 'email'], 'jon@example.com'); @@ -6464,7 +6464,7 @@ public function fillField($field, $value): void { * * Selects an option in a select tag or in radio button group. * - * ``` php + * ```php * selectOption('form select[name=account]', 'Premium'); * $I->selectOption('form input[name=payment]', 'Monthly'); @@ -6473,17 +6473,17 @@ public function fillField($field, $value): void { * * Provide an array for the second argument to select multiple options: * - * ``` php + * ```php * selectOption('Which OS do you use?', array('Windows','Linux')); + * $I->selectOption('Which OS do you use?', ['Windows', 'Linux']); * ``` * * Or provide an associative array for the second argument to specifically define which selection method should be used: * - * ``` php + * ```php * selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows' - * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows' + * $I->selectOption('Which OS do you use?', ['text' => 'Windows']); // Only search by text 'Windows' + * $I->selectOption('Which OS do you use?', ['value' => 'windows']); // Only search by value 'windows' * ``` * @see \Codeception\Lib\InnerBrowser::selectOption() */ @@ -6497,7 +6497,7 @@ public function selectOption($select, $option): void { * * Ticks a checkbox. For radio buttons, use the `selectOption` method instead. * - * ``` php + * ```php * checkOption('#agree'); * ``` @@ -6513,7 +6513,7 @@ public function checkOption($option): void { * * Unticks a checkbox. * - * ``` php + * ```php * uncheckOption('#notify'); * ``` @@ -6529,7 +6529,7 @@ public function uncheckOption($option): void { * * Attaches a file relative to the Codeception `_data` directory to the given file upload field. * - * ``` php + * ```php * attachFile('input[@type="file"]', 'prices.xls'); @@ -6624,7 +6624,7 @@ public function makeHtmlSnapshot(?string $name = NULL): void { * If a fuzzy locator is used, the element is found using CSS, XPath, * and by matching the full page source by regular expression. * - * ``` php + * ```php * grabTextFrom('h1'); * $heading = $I->grabTextFrom('descendant-or-self::h1'); @@ -6640,10 +6640,10 @@ public function grabTextFrom($cssOrXPathOrRegex): mixed { /** * [!] Method is generated. Documentation taken from corresponding module. * - * Grabs the value of the given attribute value from the given element. - * Fails if element is not found. + * Returns the value of the given attribute value from the given HTML element. For some attributes, the string `true` is returned instead of their literal value (e.g. `disabled="disabled"` or `required="required"`). + * Fails if the element is not found. Returns `null` if the attribute is not present on the element. * - * ``` php + * ```php * grabAttributeFrom('#tooltip', 'title'); * ``` @@ -6689,7 +6689,7 @@ public function grabMultiple($cssOrXpath, ?string $attribute = NULL): array { * Finds the value for the given form field. * If a fuzzy locator is used, the field is found by field name, CSS, and XPath. * - * ``` php + * ```php * grabValueFrom('Name'); * $name = $I->grabValueFrom('input[name=username]'); @@ -6709,7 +6709,7 @@ public function grabValueFrom($field): mixed { * Sets a cookie with the given name and value. * You can set additional cookie params like `domain`, `path`, `expires`, `secure` in array passed as last argument. * - * ``` php + * ```php * setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); * ``` @@ -6755,7 +6755,7 @@ public function grabPageSource(): string { * Checks that a cookie with the given name is set. * You can set additional cookie params like `domain`, `path` as array passed in last argument. * - * ``` php + * ```php * seeCookie('PHPSESSID'); * ``` @@ -6773,7 +6773,7 @@ public function seeCookie($cookie, $params = []) { * Checks that a cookie with the given name is set. * You can set additional cookie params like `domain`, `path` as array passed in last argument. * - * ``` php + * ```php * seeCookie('PHPSESSID'); * ``` @@ -6834,7 +6834,7 @@ public function resetCookie($cookie, $params = []) { * You can also specify expected attributes of this element. * Only works if `` tag is present. * - * ``` php + * ```php * seeElement('.error'); * $I->seeElement('//form/input[1]'); @@ -6857,7 +6857,7 @@ public function seeElement($selector, array $attributes = []): void { * You can also specify expected attributes of this element. * Only works if `` tag is present. * - * ``` php + * ```php * seeElement('.error'); * $I->seeElement('//form/input[1]'); @@ -6880,7 +6880,7 @@ public function canSeeElement($selector, array $attributes = []): void { * Checks that the given element is invisible or not present on the page. * You can also specify expected attributes of this element. * - * ``` php + * ```php * dontSeeElement('.error'); * $I->dontSeeElement('//form/input[1]'); @@ -6899,7 +6899,7 @@ public function dontSeeElement($selector, array $attributes = []): void { * Checks that the given element is invisible or not present on the page. * You can also specify expected attributes of this element. * - * ``` php + * ```php * dontSeeElement('.error'); * $I->dontSeeElement('//form/input[1]'); @@ -6918,7 +6918,7 @@ public function cantSeeElement($selector, array $attributes = []): void { * * Checks that there are a certain number of elements matched by the given locator on the page. * - * ``` php + * ```php * seeNumberOfElements('tr', 10); * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements @@ -6936,7 +6936,7 @@ public function seeNumberOfElements($selector, $expected): void { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that there are a certain number of elements matched by the given locator on the page. * - * ``` php + * ```php * seeNumberOfElements('tr', 10); * $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements @@ -6955,7 +6955,7 @@ public function canSeeNumberOfElements($selector, $expected): void { * * Checks that the given option is selected. * - * ``` php + * ```php * seeOptionIsSelected('#form input[name=payment]', 'Visa'); * ``` @@ -6972,7 +6972,7 @@ public function seeOptionIsSelected($selector, $optionText) { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that the given option is selected. * - * ``` php + * ```php * seeOptionIsSelected('#form input[name=payment]', 'Visa'); * ``` @@ -6990,7 +6990,7 @@ public function canSeeOptionIsSelected($selector, $optionText) { * * Checks that the given option is not selected. * - * ``` php + * ```php * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); * ``` @@ -7007,7 +7007,7 @@ public function dontSeeOptionIsSelected($selector, $optionText) { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that the given option is not selected. * - * ``` php + * ```php * dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); * ``` @@ -7225,7 +7225,7 @@ public function canSeeResponseCodeIsServerError(): void { * * Checks that the page title contains the given string. * - * ``` php + * ```php * seeInTitle('Blog - Post #1'); * ``` @@ -7242,7 +7242,7 @@ public function seeInTitle($title) { * [!] Conditional Assertion: Test won't be stopped on fail * Checks that the page title contains the given string. * - * ``` php + * ```php * seeInTitle('Blog - Post #1'); * ``` diff --git a/tests/_support/_generated/FunctionalTesterActions.php b/tests/_support/_generated/FunctionalTesterActions.php index 79c391a51..e0899ed90 100644 --- a/tests/_support/_generated/FunctionalTesterActions.php +++ b/tests/_support/_generated/FunctionalTesterActions.php @@ -1,4 +1,4 @@ -seeFileFound('shop.log'); * ``` * - * @param string|null $path The path, relative to the site uploads folder. + * @param string|int|null $path The path, relative to the site uploads folder. * * * @throws Exception If the path is a date string and is not parsable by the `strtotime` function. * @see \lucatume\WPBrowser\Module\WPFilesystem::amInUploadsPath() */ - public function amInUploadsPath(?string $path = NULL): void { + public function amInUploadsPath(string|int|null $path = NULL): void { $this->getScenario()->runStep(new \Codeception\Step\Condition('amInUploadsPath', func_get_args())); } diff --git a/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryPluginLocationTest.php b/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryPluginLocationTest.php index 839a45a00..b3b030b86 100644 --- a/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryPluginLocationTest.php +++ b/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryPluginLocationTest.php @@ -18,6 +18,8 @@ use PHPUnit\Framework\Assert; use tad\Codeception\SnapshotAssertions\SnapshotAssertions; +// @group slow +// @group isolated-2 class WPLoaderArbitraryPluginLocationTest extends Unit { use SnapshotAssertions; diff --git a/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryThemeLocationTest.php b/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryThemeLocationTest.php index 0f8222122..c3f9e4f59 100644 --- a/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryThemeLocationTest.php +++ b/tests/unit/lucatume/WPBrowser/Module/WPLoaderArbitraryThemeLocationTest.php @@ -19,6 +19,8 @@ use PHPUnit\Framework\Assert; use tad\Codeception\SnapshotAssertions\SnapshotAssertions; +// @group slow +// @group isolated-2 class WPLoaderArbitraryThemeLocationTest extends Unit { use SnapshotAssertions; diff --git a/tests/unit/lucatume/WPBrowser/Module/WPLoaderTest.php b/tests/unit/lucatume/WPBrowser/Module/WPLoaderTest.php index 430c9eec6..f879f81d0 100644 --- a/tests/unit/lucatume/WPBrowser/Module/WPLoaderTest.php +++ b/tests/unit/lucatume/WPBrowser/Module/WPLoaderTest.php @@ -44,6 +44,7 @@ /** * @group slow + * @group isolated-1 */ class WPLoaderTest extends Unit { diff --git a/tests/unit/lucatume/WPBrowser/Module/WPTestCaseStrictTest.php b/tests/unit/lucatume/WPBrowser/Module/WPTestCaseStrictTest.php index da6d5a7a7..1cd57f22a 100644 --- a/tests/unit/lucatume/WPBrowser/Module/WPTestCaseStrictTest.php +++ b/tests/unit/lucatume/WPBrowser/Module/WPTestCaseStrictTest.php @@ -17,6 +17,8 @@ use lucatume\WPBrowser\WordPress\Installation; use PHPUnit\Framework\Assert; +// @group slow +// @group isolated-2 class WPTestCaseStrictTest extends Unit { use LoopIsolation;