Skip to content

Commit 7dd60e9

Browse files
committed
Add function support for assertSameDictionaryKeysValues
1 parent 727b260 commit 7dd60e9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Framework/Assert/Functions.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,6 +1837,23 @@ function assertNotSame(mixed $expected, mixed $actual, string $message = ''): vo
18371837
}
18381838
}
18391839

1840+
if (!function_exists('PHPUnit\Framework\assertSameDictionaryKeysValues')) {
1841+
/**
1842+
* Assert that two arrays have the same keys and values for those keys.
1843+
* The order of the keys is ignored.
1844+
*
1845+
* @throws ExpectationFailedException
1846+
*
1847+
* @no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit
1848+
*
1849+
* @see Assert::assertSameDictionaryKeysValues
1850+
*/
1851+
function assertSameDictionaryKeysValues(mixed $expected, mixed $actual, string $message = ''): void
1852+
{
1853+
Assert::assertSameDictionaryKeysValues(...func_get_args());
1854+
}
1855+
}
1856+
18401857
if (!function_exists('PHPUnit\Framework\assertInstanceOf')) {
18411858
/**
18421859
* Asserts that a variable is of a given type.

0 commit comments

Comments
 (0)