function RouteBuilderTest::testRebuildBlockingLock
Tests route rebuilding with a blocking lock.
File
- 
              core/
tests/ Drupal/ Tests/ Core/ Routing/ RouteBuilderTest.php, line 118  
Class
- RouteBuilderTest
 - @coversDefaultClass \Drupal\Core\Routing\RouteBuilder[[api-linebreak]] @group Routing
 
Namespace
Drupal\Tests\Core\RoutingCode
public function testRebuildBlockingLock() {
  $this->lock
    ->expects($this->once())
    ->method('acquire')
    ->with('router_rebuild')
    ->will($this->returnValue(FALSE));
  $this->lock
    ->expects($this->once())
    ->method('wait')
    ->with('router_rebuild');
  $this->lock
    ->expects($this->never())
    ->method('release');
  $this->yamlDiscovery
    ->expects($this->never())
    ->method('findAll');
  $this->assertFalse($this->routeBuilder
    ->rebuild());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.