protected function TmgmtExtensionSuitTestBase::getNodeHash in TMGMT Extension Suite 8.3
Same name and namespace in other branches
- 8.2 tests/src/Functional/TmgmtExtensionSuitTestBase.php \Drupal\Tests\tmgmt_extension_suit\Functional\TmgmtExtensionSuitTestBase::getNodeHash()
Returns job item hash by node id and job id.
Parameters
int $nid: Node id.
int $jobId: Job id.
Return value
bool|string Returns hash.
6 calls to TmgmtExtensionSuitTestBase::getNodeHash()
- CheckEntityChangesTest::testDoNotTrackTranslatableEntityChanges in tests/
src/ Functional/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned off.
- CheckEntityChangesTest::testDoNotTrackTranslatableEntityChangesIfNoLanguagesSelected in tests/
src/ Functional/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned on.
- CheckEntityChangesTest::testTrackTranslatableEntityChanges in tests/
src/ Functional/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned on.
- CheckEntityChangesTest::testTrackTranslatableEntityChangesAllLanguagesSelected in tests/
src/ Functional/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned on.
- CheckEntityChangesTest::testTrackTranslatableEntityChangesNotAllLanguagesSelected in tests/
src/ Functional/ CheckEntityChangesTest.php - Test "Track changes of the translatable entities" feature is turned on.
File
- tests/
src/ Functional/ TmgmtExtensionSuitTestBase.php, line 186
Class
- TmgmtExtensionSuitTestBase
- Basic class for tmgmt extension module.
Namespace
Drupal\Tests\tmgmt_extension_suit\FunctionalCode
protected function getNodeHash($nid, $jobId) {
$hashQuery = Drupal::database()
->select('tmgmt_job_item', 'tji');
$hashQuery
->join('tmgmt_job', 'tj', 'tj.tjid = tji.tjid');
$hash = $hashQuery
->condition('tj.tjid', $jobId)
->condition('tji.item_id', $nid)
->fields('tji', [
'tjid',
'tes_source_content_hash',
])
->execute()
->fetchAllKeyed();
return $hash ? reset($hash) : FALSE;
}