diff --git a/core/modules/rest/tests/src/Unit/CollectRoutesTest.php b/core/modules/rest/tests/src/Unit/CollectRoutesTest.php index c49ff87..88c4d12 100644 --- a/core/modules/rest/tests/src/Unit/CollectRoutesTest.php +++ b/core/modules/rest/tests/src/Unit/CollectRoutesTest.php @@ -78,6 +78,14 @@ protected function setUp() { $container->set('plugin.manager.views.style', $style_manager); $container->set('renderer', $this->getMock('Drupal\Core\Render\RendererInterface')); + $authentication_manager = $this->getMockBuilder('\Drupal\Core\Authentication\AuthenticationManager') + ->disableOriginalConstructor() + ->getMock(); + $container->set('authentication', $authentication_manager); + $authentication_manager->expects($this->any()) + ->method('getSortedProviders') + ->will($this->returnValue(array('basic_auth' => 'data', 'cookie' => 'data'))); + \Drupal::setContainer($container); $this->restExport = RestExport::create($container, array(), "test_routes", array());