You are here

public function RouteBuilderTest::testRebuildLockingUnlocking in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\RouteBuilderTest::testRebuildLockingUnlocking()

Tests that the route rebuilding both locks and unlocks.

File

core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php, line 97
Contains \Drupal\Tests\Core\Routing\RouteBuilderTest.

Class

RouteBuilderTest
@coversDefaultClass \Drupal\Core\Routing\RouteBuilder @group Routing

Namespace

Drupal\Tests\Core\Routing

Code

public function testRebuildLockingUnlocking() {
  $this->lock
    ->expects($this
    ->once())
    ->method('acquire')
    ->with('router_rebuild')
    ->will($this
    ->returnValue(TRUE));
  $this->lock
    ->expects($this
    ->once())
    ->method('release')
    ->with('router_rebuild');
  $this->yamlDiscovery
    ->expects($this
    ->any())
    ->method('findAll')
    ->will($this
    ->returnValue(array()));
  $this
    ->assertTrue($this->routeBuilder
    ->rebuild());
}