TwigExtensionsAdminTest.php in Twig Extensions 8.2
File
tests/src/Functional/TwigExtensionsAdminTest.php
View source
<?php
namespace Drupal\Tests\twig_extensions\Functional;
use Drupal\Tests\BrowserTestBase;
use Drupal\views\Entity\View;
class TwigExtensionsAdminTest extends BrowserTestBase {
protected $adminUser;
protected $profile = 'standard';
public static $modules = [
'twig_extensions',
];
protected function setUp() {
parent::setUp();
$this->adminUser = $this
->drupalCreateUser([], NULL, TRUE);
}
public function testContentAdminPage() {
$view = View::load('content');
$display =& $view
->getDisplay('default');
$display['display_options']['pager'] = [
'type' => 'mini',
'options' => [
'items_per_page' => 1,
'tags' => [
'previous' => '‹‹',
'next' => '››',
],
],
];
$view
->save();
$this
->drupalCreateNode([
'type' => 'article',
]);
$this
->drupalCreateNode([
'type' => 'article',
]);
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('/admin/content');
$this
->assertSession()
->statusCodeEquals(200);
}
}