You are here

protected function EmbeddedScheduledUpdateTypeTestBase::checkRunningPromoteUpdates in Scheduled Updates 8

Checking adding and running updates for title.

Hardcoded for node 'title' property now.

Parameters

string $bundle:

string $reference_field_label:

string $reference_field_name:

Throws

\Behat\Mink\Exception\DriverException

\Behat\Mink\Exception\ElementNotFoundException

\Behat\Mink\Exception\ExpectationException

\Behat\Mink\Exception\ResponseTextException

\Behat\Mink\Exception\UnsupportedDriverActionException

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 call to EmbeddedScheduledUpdateTypeTestBase::checkRunningPromoteUpdates()
EmbeddedScheduledUpdateTypeTestBase::checkAfterTypeCreated in tests/src/FunctionalJavascript/EmbeddedScheduledUpdateTypeTestBase.php

File

tests/src/FunctionalJavascript/EmbeddedScheduledUpdateTypeTestBase.php, line 298
Contains \Drupal\Tests\scheduled_updates\EmbeddedScheduledUpdateTypeTestBase.

Class

EmbeddedScheduledUpdateTypeTestBase
Base test class for embedded update types.

Namespace

Drupal\Tests\scheduled_updates\FunctionalJavascript

Code

protected function checkRunningPromoteUpdates($bundle, $reference_field_name, $reference_field_label) {
  $update_node = $this
    ->createNodeWithUpdate('Upate Node', '-1 year', $bundle, $reference_field_name, $reference_field_label, TRUE);
  $no_update_node = $this
    ->createNodeWithUpdate('No update node', '+1 year', $bundle, $reference_field_name, $reference_field_label, TRUE);
  $this
    ->runUpdatesUI();
  $this
    ->checkEntityValue('node', $update_node, 'promote', 1);
  $this
    ->checkEntityValue('node', $no_update_node, 'promote', 0);
}