EntityNotTranslatableTest.php in Entity Share 8.2
File
modules/entity_share_client/tests/src/Functional/EntityNotTranslatableTest.php
View source
<?php
declare (strict_types=1);
namespace Drupal\Tests\entity_share_client\Functional;
use Drupal\Core\Language\LanguageInterface;
class EntityNotTranslatableTest extends EntityShareClientFunctionalTestBase {
public static $modules = [
'entity_share_entity_test',
];
protected static $entityTypeId = 'entity_test_not_translatable';
protected static $entityBundleId = 'entity_test_not_translatable';
protected static $entityLangcode = LanguageInterface::LANGCODE_NOT_SPECIFIED;
protected function setUp() {
parent::setUp();
$this
->postSetupFixture();
}
protected function getChannelUserPermissions() {
$permissions = parent::getChannelUserPermissions();
$permissions[] = 'view test entity';
return $permissions;
}
protected function getEntitiesDataArray() {
return [
'entity_test_not_translatable' => [
LanguageInterface::LANGCODE_NOT_SPECIFIED => [
'entity_test_not_translatable' => [
'name' => [
'value' => $this
->randomString(),
'checker_callback' => 'getValue',
],
],
],
],
];
}
public function testBasicPull() {
$this
->pullEveryChannels();
$this
->checkCreatedEntities();
}
}