Move into nested docroot
This commit is contained in:
parent
83a0d3a149
commit
c8b70abde9
13405 changed files with 0 additions and 0 deletions
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\config\Functional;
|
||||
|
||||
use Drupal\Tests\BrowserTestBase;
|
||||
use Drupal\user\Entity\Role;
|
||||
|
||||
/**
|
||||
* Tests draggable list builder.
|
||||
*
|
||||
* @group config
|
||||
*/
|
||||
class ConfigDraggableListBuilderTest extends BrowserTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = array('config_test');
|
||||
|
||||
/**
|
||||
* Test draggable lists.
|
||||
*/
|
||||
public function testDraggableList() {
|
||||
$this->drupalLogin($this->drupalCreateUser(array('administer permissions')));
|
||||
|
||||
// Create more than 50 roles.
|
||||
for ($i = 0; $i < 51; $i++) {
|
||||
$role = Role::create([
|
||||
'id' => 'role_' . $i,
|
||||
'label' => "Role $i",
|
||||
]);
|
||||
$role->save();
|
||||
}
|
||||
|
||||
// Navigate to Roles page
|
||||
$this->drupalGet('admin/people/roles');
|
||||
|
||||
// Test for the page title.
|
||||
$this->assertSession()->titleEquals(t('Roles') . ' | Drupal');
|
||||
|
||||
// Count the number of rows in table.
|
||||
$rows = $this->xpath('//form[@class="user-admin-roles-form"]/table/tbody/tr');
|
||||
$this->assertGreaterThan(50, count($rows));
|
||||
for ($i = 0; $i < 51; $i++) {
|
||||
$this->assertSession()->pageTextContains("Role $i");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\config\Unit\Menu;
|
||||
|
||||
use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;
|
||||
|
||||
/**
|
||||
* Tests existence of config local tasks.
|
||||
*
|
||||
* @group config
|
||||
*/
|
||||
class ConfigLocalTasksTest extends LocalTaskIntegrationTestBase {
|
||||
|
||||
protected function setUp() {
|
||||
$this->directoryList = array('config' => 'core/modules/config');
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests config local tasks existence.
|
||||
*
|
||||
* @dataProvider getConfigAdminRoutes
|
||||
*/
|
||||
public function testConfigAdminLocalTasks($route, $expected) {
|
||||
$this->assertLocalTasks($route, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a list of routes to test.
|
||||
*/
|
||||
public function getConfigAdminRoutes() {
|
||||
return array(
|
||||
array('config.sync', array(array('config.sync', 'config.import', 'config.export'))),
|
||||
array('config.import_full', array(array('config.sync', 'config.import', 'config.export'), array('config.import_full', 'config.import_single'))),
|
||||
array('config.import_single', array(array('config.sync', 'config.import', 'config.export'), array('config.import_full', 'config.import_single'))),
|
||||
array('config.export_full', array(array('config.sync', 'config.import', 'config.export'), array('config.export_full', 'config.export_single'))),
|
||||
array('config.export_single', array(array('config.sync', 'config.import', 'config.export'), array('config.export_full', 'config.export_single'))),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in a new issue