/** * Tests the loadMultiple() method. */ public function testLoadMultiple() { $ids = array(1, 2); $storage = $this->getMock('Drupal\\Core\\Entity\\EntityStorageInterface'); $storage->expects($this->once())->method('loadMultiple')->with($ids)->will($this->returnValue($this->entities)); $this->entityManager->expects($this->once())->method('getStorage')->with($this->entityTypeId)->will($this->returnValue($storage)); $workspace_manager = new WorkspaceManager($this->requestStack, $this->entityManager, $this->cacheRender); $entities = $workspace_manager->loadMultiple($ids); $this->assertSame($this->entities, $entities); }