public function PreserveTitlesOptionTest::createTestNodes in Automatic Entity Label 8.3
Creates number of dummy nodes of provided type.
Parameters
int $numberOfNodes: Number of nodes to be created.
string $nodeType: Type of node to be created.
1 call to PreserveTitlesOptionTest::createTestNodes()
- PreserveTitlesOptionTest::assertPreserveTitlesOption in tests/
src/ Functional/ PreserveTitlesOptionTest.php - Asserts that 'Preserve already created titles' option works correctly.
File
- tests/
src/ Functional/ PreserveTitlesOptionTest.php, line 130
Class
- PreserveTitlesOptionTest
- Tests 'Preserve already created titles' option.
Namespace
Drupal\Tests\auto_entitylabel\FunctionalCode
public function createTestNodes(int $numberOfNodes, string $nodeType) {
for ($i = 0; $i < $numberOfNodes; $i++) {
$this
->drupalCreateNode([
'type' => $nodeType,
'title' => 'Testing node ' . $nodeType . ' ' . $i,
]);
}
}