protected function ExportTest::updateAuthoredNode in Acquia Content Hub 8.2
Updates the authored node.
Parameters
int $nid: Node id.
int $items_expected: Expected number of items in the queue.
array $cdf_expectations: The sets of expectation arguments for CDF object validation.
Throws
\Drupal\Core\Entity\EntityStorageException
See also
\Drupal\Tests\acquia_contenthub\Kernel\ExportTest::testPublishingUserProfile
1 call to ExportTest::updateAuthoredNode()
- ExportTest::testPublishingUserProfile in tests/
src/ Kernel/ ExportTest.php - Tests publishing of node and user profile.
File
- tests/
src/ Kernel/ ExportTest.php, line 2313
Class
- ExportTest
- Tests entity exports.
Namespace
Drupal\Tests\acquia_contenthub\KernelCode
protected function updateAuthoredNode($nid, &$items_expected, array &$cdf_expectations = []) {
$title = $this
->randomString(30);
$node = Node::load($nid);
$node
->set('title', $title);
$node
->save();
$items_expected = 1;
$cdf_expectations = [
[
$nid,
$title,
'test_content_type',
Node::PUBLISHED,
[],
[],
],
];
}