public function ElementTest::providerVisibleChildren in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Render/ElementTest.php \Drupal\Tests\Core\Render\ElementTest::providerVisibleChildren()
Data provider for testVisibleChildren.
Return value
array
File
- core/
tests/ Drupal/ Tests/ Core/ Render/ ElementTest.php, line 149 - Contains \Drupal\Tests\Core\Render\ElementTest.
Class
- ElementTest
- @coversDefaultClass \Drupal\Core\Render\Element @group Render
Namespace
Drupal\Tests\Core\RenderCode
public function providerVisibleChildren() {
return array(
array(
array(
'#property1' => '',
'#property2' => array(),
),
array(),
),
array(
array(
'#property1' => '',
'child1' => array(),
),
array(
'child1',
),
),
array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#access' => TRUE,
),
),
array(
'child1',
'child2',
),
),
array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#access' => FALSE,
),
),
array(
'child1',
),
),
'access_result_object_allowed' => array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#access' => AccessResult::allowed(),
),
),
array(
'child1',
'child2',
),
),
'access_result_object_forbidden' => array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#access' => AccessResult::forbidden(),
),
),
array(
'child1',
),
),
array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#type' => 'textfield',
),
),
array(
'child1',
'child2',
),
),
array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#type' => 'value',
),
),
array(
'child1',
),
),
array(
array(
'#property1' => '',
'child1' => array(),
'child2' => array(
'#type' => 'hidden',
),
),
array(
'child1',
),
),
);
}