LingotekProfileEntityIdUpdate8002Test.php in Lingotek Translation 8.2
File
tests/src/Functional/Update/LingotekProfileEntityIdUpdate8002Test.php
View source
<?php
namespace Drupal\Tests\lingotek\Functional\Update;
use Drupal\FunctionalTests\Update\UpdatePathTestBase;
use Drupal\lingotek\Entity\LingotekProfile;
class LingotekProfileEntityIdUpdate8002Test extends UpdatePathTestBase {
protected function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../fixtures/update/drupal-8.lingotek.standard.pre8002.php.gz',
];
}
public function testConfigEntityMetadataUpdate8001() {
$this
->runUpdates();
$entity_type = \Drupal::entityTypeManager()
->getDefinition('profile', FALSE);
$this
->assertNull($entity_type);
$entity_type = \Drupal::entityTypeManager()
->getDefinition('lingotek_profile', FALSE);
$this
->assertNotNull($entity_type
->id());
$profile = LingotekProfile::load('automatic');
$this
->assertNotNull($profile
->id());
}
}