public function BreadcrumbManagerTest::testBuildWithInvalidBreadcrumbResult in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Breadcrumb/BreadcrumbManagerTest.php \Drupal\Tests\Core\Breadcrumb\BreadcrumbManagerTest::testBuildWithInvalidBreadcrumbResult()
Tests a breadcrumb builder with a bad return value.
@expectedException \UnexpectedValueException
File
- core/
tests/ Drupal/ Tests/ Core/ Breadcrumb/ BreadcrumbManagerTest.php, line 194 - Contains \Drupal\Tests\Core\Breadcrumb\BreadcrumbManagerTest.
Class
- BreadcrumbManagerTest
- @coversDefaultClass \Drupal\Core\Breadcrumb\BreadcrumbManager @group Breadcrumb
Namespace
Drupal\Tests\Core\BreadcrumbCode
public function testBuildWithInvalidBreadcrumbResult() {
$builder = $this
->getMock('Drupal\\Core\\Breadcrumb\\BreadcrumbBuilderInterface');
$builder
->expects($this
->once())
->method('applies')
->will($this
->returnValue(TRUE));
$builder
->expects($this
->once())
->method('build')
->will($this
->returnValue('invalid_result'));
$this->breadcrumbManager
->addBuilder($builder, 0);
$this->breadcrumbManager
->build($this
->getMock('Drupal\\Core\\Routing\\RouteMatchInterface'));
}