function DiffArrayTest::setUp
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php \Drupal\Tests\Core\Common\DiffArrayTest::setUp()
- 10 core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php \Drupal\Tests\Core\Common\DiffArrayTest::setUp()
- 11.x core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php \Drupal\Tests\Core\Common\DiffArrayTest::setUp()
Overrides UnitTestCase::setUp
File
-
core/
tests/ Drupal/ Tests/ Core/ Common/ DiffArrayTest.php, line 32
Class
- DiffArrayTest
- Tests the DiffArray helper class.
Namespace
Drupal\Tests\Core\CommonCode
protected function setUp() : void {
parent::setUp();
$this->array1 = [
'same' => 'yes',
'different' => 'no',
'array_empty_diff' => [],
'null' => NULL,
'int_diff' => 1,
'array_diff' => [
'same' => 'same',
'array' => [
'same' => 'same',
],
],
'array_compared_to_string' => [
'value',
],
'string_compared_to_array' => 'value',
'new' => 'new',
];
$this->array2 = [
'same' => 'yes',
'different' => 'yes',
'array_empty_diff' => [],
'null' => NULL,
'int_diff' => '1',
'array_diff' => [
'same' => 'different',
'array' => [
'same' => 'same',
],
],
'array_compared_to_string' => 'value',
'string_compared_to_array' => [
'value',
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.