Skip to content

Commit

Permalink
Merge branch '1.x' into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Apr 15, 2024
2 parents ae029ff + 3abb63e commit 8c2f833
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Set up node and enable caching of dependencies
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

# To make the command available on CLI, it needs to be installed globally.
- name: Install Remark CLI globally
Expand Down
2 changes: 1 addition & 1 deletion .remarkrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"remark-lint-no-unneeded-full-reference-link",
"remark-lint-no-unused-definitions",
["remark-lint-strikethrough-marker", "~~"],
["remark-lint-table-cell-padding", "consistent"],
["remark-lint-table-cell-padding", "padded"],
"remark-lint-heading-whitespace",
"remark-lint-list-item-punctuation",
"remark-lint-match-punctuation",
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ To prevent _"conflicting method names"_ errors when a trait is `use`d multiple t
You will need to make sure to `use` any additional traits needed for the polyfills to work.

| PHPUnit | When `use`-ing this trait | You also need to `use` this trait |
|-----------|-----------------------------|-----------------------------------|
| --------- | --------------------------- | --------------------------------- |
| 5.7 < 7.5 | `AssertIgnoringLineEndings` | `AssertStringContains` |

_**Note: this only applies to the stand-alone use of the traits. The [`TestCase` classes](#testcases) provided by this library already take care of this automatically.**_
Expand Down Expand Up @@ -207,7 +207,7 @@ This method was introduced in PHPUnit 6.4.0.

Polyfills the following methods:
| | | |
|-----------------------------------|-----------------------------------|---------------------------------|
| --------------------------------- | --------------------------------- | ------------------------------- |
| [`Assert::assertIsArray()`] | [`Assert::assertIsBool()`] | [`Assert::assertIsFloat()`] |
| [`Assert::assertIsInt()`] | [`Assert::assertIsNumeric()`] | [`Assert::assertIsObject()`] |
| [`Assert::assertIsResource()`] | [`Assert::assertIsString()`] | [`Assert::assertIsScalar()`] |
Expand Down Expand Up @@ -246,7 +246,7 @@ These methods were introduced in PHPUnit 7.5.0 as alternatives to the `Assert::a

Polyfills the following methods:
| | |
|------------------------------------------------------|---------------------------------------------------------|
| ---------------------------------------------------- | ------------------------------------------------------- |
| [`Assert::assertStringContainsString()`] | [`Assert::assertStringNotContainsString()`] |
| [`Assert::assertStringContainsStringIgnoringCase()`] | [`Assert::assertStringNotContainsStringIgnoringCase()`] |

Expand All @@ -261,7 +261,7 @@ These methods were introduced in PHPUnit 7.5.0 as alternatives to using `Assert:

Polyfills the following methods:
| | |
|------------------------------------------|---------------------------------------------|
| ---------------------------------------- | ------------------------------------------- |
| [`Assert::assertEqualsCanonicalizing()`] | [`Assert::assertNotEqualsCanonicalizing()`] |
| [`Assert::assertEqualsIgnoringCase()`] | [`Assert::assertNotEqualsIgnoringCase()`] |
| [`Assert::assertEqualsWithDelta()`] | [`Assert::assertNotEqualsWithDelta()`] |
Expand All @@ -288,7 +288,7 @@ The `TestCase::expectExceptionMessageRegExp()` method was soft deprecated in PHP

Polyfills the following methods:
| | |
|----------------------------------------------------|-------------------------------------------------------|
| -------------------------------------------------- | ----------------------------------------------------- |
| [`Assert::assertFileEqualsCanonicalizing()`] | [`Assert::assertFileNotEqualsCanonicalizing()`] |
| [`Assert::assertFileEqualsIgnoringCase()`] | [`Assert::assertFileNotEqualsIgnoringCase()`] |
| [`Assert::assertStringEqualsFileCanonicalizing()`] | [`Assert::assertStringNotEqualsFileCanonicalizing()`] |
Expand All @@ -309,7 +309,7 @@ These methods were introduced in PHPUnit 8.5.0 as alternatives to using `Assert:

Polyfills the following methods:
| | |
|-----------------------------------|---------------------------------|
| --------------------------------- | ------------------------------- |
| `Assert::equalToCanonicalizing()` | `Assert::equalToIgnoringCase()` |
| `Assert::equalToWithDelta()` | |

Expand Down Expand Up @@ -347,7 +347,7 @@ The original methods these new methods replace were hard deprecated in PHPUnit 9

Polyfills the following methods:
| | |
|--------------------------------------|-----------------------------------------|
| ------------------------------------ | --------------------------------------- |
| [`Assert::assertIsClosedResource()`] | [`Assert::assertIsNotClosedResource()`] |

These methods were introduced in PHPUnit 9.3.0.
Expand Down Expand Up @@ -404,7 +404,7 @@ The `assertObjectEquals()` assertion was introduced in PHPUnit 9.4.0.

Polyfills the following methods:
| | |
|-----------------------------------------------------------|-------------------------------------------------------------|
| --------------------------------------------------------- | ----------------------------------------------------------- |
| [`Assert::assertStringEqualsStringIgnoringLineEndings()`] | [`Assert::assertStringContainsStringIgnoringLineEndings()`] |

These methods were introduced in PHPUnit 10.0.0.
Expand All @@ -416,7 +416,7 @@ These methods were introduced in PHPUnit 10.0.0.

Polyfills the following method:
| |
|----------------------------|
| -------------------------- |
| [`Assert::assertIsList()`] |

This method was introduced in PHPUnit 10.0.0.
Expand All @@ -427,7 +427,7 @@ This method was introduced in PHPUnit 10.0.0.

Polyfills the following method:
| | |
|---------------------------------------|------------------------------------------|
| ------------------------------------- | ---------------------------------------- |
| [`Assert::assertObjectHasProperty()`] | [`Assert::assertObjectNotHasProperty()`] |

These methods were introduced in PHPUnit 10.1.0 as alternatives to the `Assert::assertObjectHasAttribute()` and `Assert::assertObjectNotHasAttribute()` methods, which were hard deprecated (warning) in PHPUnit 9.6.1 and removed in PHPUnit 10.0.0.
Expand Down Expand Up @@ -614,7 +614,7 @@ This `TestListenerDefaultImplementation` trait overcomes the signature mismatche
Similar to the `TestCase` implementation, snake_case methods without type declarations are used to get round the signature mismatches. The snake_case methods will automatically be called.

| PHPUnit native method name | Replacement | Notes |
|----------------------------|-----------------------------------------|-------------------------------------------|
| -------------------------- | --------------------------------------- | ----------------------------------------- |
| `addError()` | `add_error($test, $e, $time)` | |
| `addWarning()` | `add_warning($test, $e, $time)` | Introduced in PHPUnit 6. |
| `addFailure()` | `add_failure($test, $e, $time)` | |
Expand Down Expand Up @@ -668,7 +668,7 @@ For frequently used, removed PHPUnit functionality, "helpers" may be provided. T
#### Removed functionality without PHPUnit native replacement

| PHPUnit | Removed | Issue | Remarks |
|---------|-----------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ------- | --------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 9.0.0 | `assertArraySubset()` | [#1][issue #1] | The [`dms/phpunit-arraysubset-asserts`](https://packagist.org/packages/dms/phpunit-arraysubset-asserts) package polyfills this functionality.<br/>As of [version 0.3.0](https://github.com/rdohms/phpunit-arraysubset-asserts/releases/tag/v0.3.0) this package can be installed in combination with PHP 5.4 - current and PHPUnit 4.8.36/5.7.21 - current.<br/>Alternatively, tests can be refactored using the patterns outlined in [issue #1]. |
| 9.0.0 | `assertAttribute*()` | [#2][issue #2] | Refactor the tests to not directly test private/protected properties.<br/>As an interim solution, the [`Yoast\PHPUnitPolyfills\Helpers\AssertAttributeHelper`](#yoastphpunitpolyfillshelpersassertattributehelper) trait is available. |

Expand Down

0 comments on commit 8c2f833

Please sign in to comment.