diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..6b39cea --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,13 @@ +CHANGELOG for 1.x +=================== +## v1.0.2 - (2024-01-08) + +### Added + +- `AbstractWebTestCase::assertArrayContainsValues` : Test if an array contains exactly all values of an array of values, no matter there order + +## v1.0.1 - (2024-01-04) + +### Fix + +- Fix passing format 1G to phpstan memory-limit option diff --git a/src/AbstractWebTestCase.php b/src/AbstractWebTestCase.php index ca97803..bfebc18 100644 --- a/src/AbstractWebTestCase.php +++ b/src/AbstractWebTestCase.php @@ -88,4 +88,16 @@ protected static function getMethod(string $name, string $class): \ReflectionMet return $method; } + + /** + * Test if $array contains exactly all values of $values no matter there order + */ + public function assertArrayContainsValues(array $values, array $array): void + { + $this->assertCount(count($values), $array); + + foreach ($values as $value) { + $this->assertContains($value, $array); + } + } }