only in patch2: unchanged: --- a/tests/src/Unit/panels_ipe/RequestHandlerTestBase.php +++ b/tests/src/Unit/panels_ipe/RequestHandlerTestBase.php @@ -6,6 +6,7 @@ namespace Drupal\Tests\panels\Unit\panels_ipe; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant; use Drupal\panels\Storage\PanelsStorageManagerInterface; +use Drupal\Tests\RandomGeneratorTrait; use Drupal\user\SharedTempStore; use PHPUnit_Framework_MockObject_MockObject; use Symfony\Component\HttpFoundation\JsonResponse; @@ -16,6 +17,8 @@ use Symfony\Component\HttpFoundation\Request; */ abstract class RequestHandlerTestBase extends \PHPUnit_Framework_TestCase { + use RandomGeneratorTrait; + /** @var \Drupal\panels_ipe\Helpers\RequestHandlerInterface */ protected $sut; @@ -35,13 +38,17 @@ abstract class RequestHandlerTestBase extends \PHPUnit_Framework_TestCase { parent::setUp(); $this->moduleHandler = $this->getMockForAbstractClass(ModuleHandlerInterface::class); $this->panelsStore = $this->getMockForAbstractClass(PanelsStorageManagerInterface::class); - $this->tempStore = $this->getMockBuilder(SharedTempstore::class) + $this->tempStore = $this->getMockBuilder(SharedTempStore::class) ->disableOriginalConstructor() ->getMock(); $this->panelsDisplay = $this->getMockBuilder(PanelsDisplayVariant::class) ->disableOriginalConstructor() ->getMock(); + + $this->panelsDisplay->method('id')->willReturn( + $this->randomMachineName(16) + ); } protected function createRequest($content = NULL) {