function ForumNodeBreadcrumbBuilderTest::providerTestApplies
Same name in other branches
- 9 core/modules/forum/tests/src/Unit/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumNodeBreadcrumbBuilderTest::providerTestApplies()
- 8.9.x core/modules/forum/tests/src/Unit/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumNodeBreadcrumbBuilderTest::providerTestApplies()
- 11.x core/modules/forum/tests/src/Unit/Breadcrumb/ForumNodeBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumNodeBreadcrumbBuilderTest::providerTestApplies()
Provides test data for testApplies().
Note that this test is incomplete, because we can't mock NodeInterface.
Return value
\Generator Datasets for testApplies(). Structured as such:
- ForumNodeBreadcrumbBuilder::applies() expected result.
- ForumNodeBreadcrumbBuilder::applies() $attributes input array.
File
-
core/
modules/ forum/ tests/ src/ Unit/ Breadcrumb/ ForumNodeBreadcrumbBuilderTest.php, line 96
Class
- ForumNodeBreadcrumbBuilderTest
- @coversDefaultClass \Drupal\forum\Breadcrumb\ForumNodeBreadcrumbBuilder @group forum @group legacy
Namespace
Drupal\Tests\forum\Unit\BreadcrumbCode
public static function providerTestApplies() : \Generator {
(yield [
FALSE,
]);
(yield [
FALSE,
'NOT.entity.node.canonical',
]);
(yield [
FALSE,
'entity.node.canonical',
]);
(yield [
FALSE,
'entity.node.canonical',
[
[
'node',
NULL,
],
],
]);
(yield [
TRUE,
'entity.node.canonical',
[
[
'node',
TRUE,
],
],
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.