protected function DiffArrayTest::setUp in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php \Drupal\Tests\Core\Common\DiffArrayTest::setUp()
- 9 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 29
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',
],
];
}