Loading core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php→core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php +6 −19 Original line number Diff line number Diff line <?php namespace Drupal\Tests\node\Functional; namespace Drupal\Tests\node\Kernel; use Drupal\node\Entity\Node; Loading @@ -9,27 +9,20 @@ * * @group node */ class NodeLoadMultipleTest extends NodeTestBase { class NodeLoadMultipleTest extends NodeAccessTestBase { /** * Enable Views to test the frontpage against Node::loadMultiple() results. * * @var array * {@inheritdoc} */ protected static $modules = ['views']; protected static $modules = ['node', 'user']; /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; protected function setUp(): void { parent::setUp(); $web_user = $this->drupalCreateUser([ 'create article content', 'create page content', ]); $this->drupalLogin($web_user); $this->installEntitySchema('node'); } /** Loading @@ -41,12 +34,6 @@ public function testNodeMultipleLoad() { $node3 = $this->drupalCreateNode(['type' => 'article', 'promote' => 0]); $node4 = $this->drupalCreateNode(['type' => 'page', 'promote' => 0]); // Confirm that promoted nodes appear in the default node listing. $this->drupalGet('node'); $this->assertText($node1->label(), 'Node title appears on the default listing.'); $this->assertText($node2->label(), 'Node title appears on the default listing.'); $this->assertNoText($node3->label(), 'Node title does not appear in the default listing.'); $this->assertNoText($node4->label(), 'Node title does not appear in the default listing.'); // Load nodes with only a condition. Nodes 3 and 4 will be loaded. $nodes = $this->container->get('entity_type.manager')->getStorage('node') ->loadByProperties(['promote' => 0]); Loading Loading
core/modules/node/tests/src/Functional/NodeLoadMultipleTest.php→core/modules/node/tests/src/Kernel/NodeLoadMultipleTest.php +6 −19 Original line number Diff line number Diff line <?php namespace Drupal\Tests\node\Functional; namespace Drupal\Tests\node\Kernel; use Drupal\node\Entity\Node; Loading @@ -9,27 +9,20 @@ * * @group node */ class NodeLoadMultipleTest extends NodeTestBase { class NodeLoadMultipleTest extends NodeAccessTestBase { /** * Enable Views to test the frontpage against Node::loadMultiple() results. * * @var array * {@inheritdoc} */ protected static $modules = ['views']; protected static $modules = ['node', 'user']; /** * {@inheritdoc} */ protected $defaultTheme = 'stark'; protected function setUp(): void { parent::setUp(); $web_user = $this->drupalCreateUser([ 'create article content', 'create page content', ]); $this->drupalLogin($web_user); $this->installEntitySchema('node'); } /** Loading @@ -41,12 +34,6 @@ public function testNodeMultipleLoad() { $node3 = $this->drupalCreateNode(['type' => 'article', 'promote' => 0]); $node4 = $this->drupalCreateNode(['type' => 'page', 'promote' => 0]); // Confirm that promoted nodes appear in the default node listing. $this->drupalGet('node'); $this->assertText($node1->label(), 'Node title appears on the default listing.'); $this->assertText($node2->label(), 'Node title appears on the default listing.'); $this->assertNoText($node3->label(), 'Node title does not appear in the default listing.'); $this->assertNoText($node4->label(), 'Node title does not appear in the default listing.'); // Load nodes with only a condition. Nodes 3 and 4 will be loaded. $nodes = $this->container->get('entity_type.manager')->getStorage('node') ->loadByProperties(['promote' => 0]); Loading