protected function HighWaterTest::nodeExists in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/tests/src/Kernel/HighWaterTest.php \Drupal\Tests\migrate\Kernel\HighWaterTest::nodeExists()
- 9 core/modules/migrate/tests/src/Kernel/HighWaterTest.php \Drupal\Tests\migrate\Kernel\HighWaterTest::nodeExists()
Checks if node with given title exists.
Parameters
string $title: Title of the node.
Return value
bool
File
- core/
modules/ migrate/ tests/ src/ Kernel/ HighWaterTest.php, line 297
Class
- HighWaterTest
- Tests migration high water property.
Namespace
Drupal\Tests\migrate\KernelCode
protected function nodeExists($title) {
$query = \Drupal::entityQuery('node')
->accessCheck(FALSE);
$result = $query
->condition('title', $title)
->range(0, 1)
->execute();
return !empty($result);
}