PdfUsingMpdfDynamicPermissionsTest.php in PDF using mPDF 8.2
File
tests/src/Functional/PdfUsingMpdfDynamicPermissionsTest.php
View source
<?php
namespace Drupal\Tests\pdf_using_mpdf\Functional;
use Drupal\node\NodeTypeInterface;
use Drupal\Tests\BrowserTestBase;
class PdfUsingMpdfDynamicPermissionsTest extends PdfUsingMpdfTestBase {
protected function setUp() {
parent::setUp();
}
public function testAccessPermissions() {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/people/permissions');
foreach ($this->nodeTypes as $node_type) {
$id = str_replace('_', '-', $node_type
->id());
$element = $this
->xpath('//table//tr[contains(@data-drupal-selector, "edit-permissions-generate-' . $id . '-pdf")]');
$this
->assertTrue(!empty($element));
}
}
}