You are here

public function FilenameGeneratorTest::testFilenameMultipleEntities in Entity Print 8.2

Test the filename when using multiple entities.

File

tests/src/Kernel/FilenameGeneratorTest.php, line 74

Class

FilenameGeneratorTest
@coversDefaultClass \Drupal\entity_print\FilenameGenerator @group entity_print

Namespace

Drupal\Tests\entity_print\Kernel

Code

public function testFilenameMultipleEntities() {
  $entities = [
    $this
      ->createNode([
      'title' => 'entity1',
    ]),
    $this
      ->createNode([
      'title' => 'entity2',
    ]),
  ];
  $this
    ->assertEquals('entity1-entity2', $this->filenameGenerator
    ->generateFilename($entities));
}