protected function EntityReferenceSelectionSortTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Entity/EntityReferenceSelection/EntityReferenceSelectionSortTest.php \Drupal\system\Tests\Entity\EntityReferenceSelection\EntityReferenceSelectionSortTest::setUp()
Performs setup tasks before each individual test method is run.
Overrides EntityUnitTestBase::setUp
File
- core/
modules/ system/ src/ Tests/ Entity/ EntityReferenceSelection/ EntityReferenceSelectionSortTest.php, line 29 - Contains \Drupal\system\Tests\Entity\EntityReferenceSelection\EntityReferenceSelectionSortTest.
Class
- EntityReferenceSelectionSortTest
- Tests sorting referenced items.
Namespace
Drupal\system\Tests\Entity\EntityReferenceSelectionCode
protected function setUp() {
parent::setUp();
// Create an Article node type.
$article = NodeType::create(array(
'type' => 'article',
));
$article
->save();
// Test as a non-admin.
$normal_user = $this
->createUser(array(), array(
'access content',
));
\Drupal::currentUser()
->setAccount($normal_user);
}