You are here

protected function LanguageNeutralAliasesStorageTest::getPid in Language neutral aliases 8

Get pid of an alias.

Used to get pids of aliases not accessible through the storage class, due to non-neutral language.

1 call to LanguageNeutralAliasesStorageTest::getPid()
LanguageNeutralAliasesStorageTest::testSave in tests/src/Kernel/LanguageNeutralAliasesStorageTest.php
Test that new aliases gets saved with language neutral.

File

tests/src/Kernel/LanguageNeutralAliasesStorageTest.php, line 83

Class

LanguageNeutralAliasesStorageTest
Test language neutral aliases.

Namespace

Drupal\Tests\language_neutral_aliases\Kernel

Code

protected function getPid($source) {
  return $this->container
    ->get('database')
    ->select(LanguageNeutralAliasesStorage::TABLE, 'u')
    ->fields('u', [
    $this->idField,
  ])
    ->condition($this->field, $source)
    ->execute()
    ->fetchField();
}