protected function UnitTestCase::assertArrayEquals in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/UnitTestCase.php \Drupal\Tests\UnitTestCase::assertArrayEquals()
Asserts if two arrays are equal by sorting them first.
Parameters
array $expected:
array $actual:
string $message:
33 calls to UnitTestCase::assertArrayEquals()
- AttributeTest::testAddClasses in core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php - Tests adding class attributes with the AttributeArray helper method. @covers ::addClass
- AttributeTest::testChainAddRemoveClasses in core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php - Tests removing class attributes with the Attribute helper methods. @covers ::removeClass @covers ::addClass
- AttributeTest::testRemoveClasses in core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php - Tests removing class attributes with the AttributeArray helper method. @covers ::removeClass
- AttributeTest::testSetAttribute in core/
tests/ Drupal/ Tests/ Core/ Template/ AttributeTest.php - Tests setting attributes. @covers ::setAttribute
- BatchBuilderTest::testSetQueue in core/
tests/ Drupal/ Tests/ Core/ Batch/ BatchBuilderTest.php - Tests setQueue().
File
- core/
tests/ Drupal/ Tests/ UnitTestCase.php, line 90
Class
- UnitTestCase
- Provides a base class and helpers for Drupal unit tests.
Namespace
Drupal\TestsCode
protected function assertArrayEquals(array $expected, array $actual, $message = NULL) {
ksort($expected);
ksort($actual);
$this
->assertEquals($expected, $actual, !empty($message) ? $message : '');
}