public function AutoEntityLabelBatchTest::createTestNodes in Automatic Entity Label 8.3
Creates number of nodes of provided type.
Parameters
int $numberOfNodes: Number of nodes to be created.
string $nodeType: Type of node to be created.
1 call to AutoEntityLabelBatchTest::createTestNodes()
- AutoEntityLabelBatchTest::testBatchProcess in tests/
src/ FunctionalJavascript/ AutoEntityLabelBatchTest.php - Tests that re-save batch works correctly.
File
- tests/
src/ FunctionalJavascript/ AutoEntityLabelBatchTest.php, line 122
Class
- AutoEntityLabelBatchTest
- Tests batch operations on re-save.
Namespace
Drupal\Tests\auto_entitylabel\FunctionalJavascriptCode
public function createTestNodes(int $numberOfNodes, string $nodeType) {
for ($i = 0; $i < $numberOfNodes; $i++) {
$this
->drupalCreateNode([
'type' => $nodeType,
'title' => 'Testing node ' . $nodeType . ' ' . $i,
]);
}
}