You are here

protected function MultilingualTest::expectedState in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 modules/entity_share_client/tests/src/Functional/MultilingualTest.php \Drupal\Tests\entity_share_client\Functional\MultilingualTest::expectedState()

Helper function.

Parameters

string $en_expected_state: The expected state for the en translation.

string $fr_expected_state: The expected state for the fr translation.

1 call to MultilingualTest::expectedState()
MultilingualTest::testComparison in modules/entity_share_client/tests/src/Functional/MultilingualTest.php
Test state information.

File

modules/entity_share_client/tests/src/Functional/MultilingualTest.php, line 194

Class

MultilingualTest
General functional test class for multilingual scenarios.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function expectedState($en_expected_state, $fr_expected_state) {
  $json_data = $this
    ->getEntityJsonData('node_es_test_en', 'es_test');
  $status = $this->stateInformation
    ->getStatusInfo($json_data);
  $this
    ->assertEqual($status['info_id'], $en_expected_state);
  $json_data = $this
    ->getEntityJsonData('node_es_test_fr', 'es_test');
  $status = $this->stateInformation
    ->getStatusInfo($json_data);
  $this
    ->assertEqual($status['info_id'], $fr_expected_state);
}