public function WorkspaceManagerTest::testLoadMultiple in Multiversion 8
Tests the loadMultiple() method.
File
- tests/
src/ Unit/ WorkspaceManagerTest.php, line 179
Class
- WorkspaceManagerTest
- @coversDefaultClass \Drupal\multiversion\Workspace\WorkspaceManager @group multiversion
Namespace
Drupal\Tests\multiversion\UnitCode
public function testLoadMultiple() {
$ids = [
1,
2,
];
$storage = $this
->getMock('Drupal\\Core\\Entity\\EntityStorageInterface');
$storage
->expects($this
->once())
->method('loadMultiple')
->with($ids)
->will($this
->returnValue($this->entities));
$this->entityTypeManager
->expects($this
->once())
->method('getStorage')
->with($this->entityTypeId)
->will($this
->returnValue($storage));
$workspace_manager = new WorkspaceManager($this->requestStack, $this->entityTypeManager, $this->currentUser, $this->logger);
$entities = $workspace_manager
->loadMultiple($ids);
$this
->assertSame($this->entities, $entities);
}