only in patch2: unchanged: --- a/core/modules/tour/tests/Drupal/tour/Tests/Entity/TourTest.php +++ b/core/modules/tour/tests/Drupal/tour/Tests/Entity/TourTest.php @@ -7,6 +7,7 @@ namespace Drupal\tour\Tests\Entity\TourTest; use Drupal\Tests\UnitTestCase; +use Drupal\Core\DependencyInjection\ContainerBuilder; /** * Tests the Tour entity. @@ -45,8 +46,17 @@ public static function getInfo() { * @dataProvider routeProvider */ public function testHasMatchingRoute($routes, $route_name, $route_params, $result) { - $tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour') + // Tour::__construct() pulls the plugin.manager.tour.tip service from the + // container. Mock it and and place it there. + $tip_manager = $this->getMockBuilder('Drupal\tour\TipPluginManager') ->disableOriginalConstructor() + ->getMock(); + $container = new ContainerBuilder(); + $container->set('plugin.manager.tour.tip', $tip_manager); + \Drupal::setContainer($container); + + $tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour') + ->setConstructorArgs(array(array(), 'tour')) ->setMethods(array('getRoutes')) ->getMock();