function ForumListingBreadcrumbBuilderTest::providerTestApplies
Same name in other branches
- 9 core/modules/forum/tests/src/Unit/Breadcrumb/ForumListingBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumListingBreadcrumbBuilderTest::providerTestApplies()
- 10 core/modules/forum/tests/src/Unit/Breadcrumb/ForumListingBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumListingBreadcrumbBuilderTest::providerTestApplies()
- 11.x core/modules/forum/tests/src/Unit/Breadcrumb/ForumListingBreadcrumbBuilderTest.php \Drupal\Tests\forum\Unit\Breadcrumb\ForumListingBreadcrumbBuilderTest::providerTestApplies()
Provides test data for testApplies().
Return value
array Array of datasets for testApplies(). Structured as such:
- ForumListBreadcrumbBuilder::applies() expected result.
- ForumListBreadcrumbBuilder::applies() $attributes input array.
File
-
core/
modules/ forum/ tests/ src/ Unit/ Breadcrumb/ ForumListingBreadcrumbBuilderTest.php, line 83
Class
- ForumListingBreadcrumbBuilderTest
- @coversDefaultClass \Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder @group forum
Namespace
Drupal\Tests\forum\Unit\BreadcrumbCode
public function providerTestApplies() {
// Send a Node mock, because NodeInterface cannot be mocked.
$mock_term = $this->getMockBuilder('Drupal\\taxonomy\\Entity\\Term')
->disableOriginalConstructor()
->getMock();
return [
[
FALSE,
],
[
FALSE,
'NOT.forum.page',
],
[
FALSE,
'forum.page',
],
[
TRUE,
'forum.page',
[
[
'taxonomy_term',
'anything',
],
],
],
[
TRUE,
'forum.page',
[
[
'taxonomy_term',
$mock_term,
],
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.