Update to Drupal 8.0.0-beta15. For more information, see: https://www.drupal.org/node/2563023
This commit is contained in:
parent
2720a9ec4b
commit
f3791f1da3
1898 changed files with 54300 additions and 11481 deletions
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\language_test\Entity\NoLanguageEntityTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\language_test\Entity;
|
||||
|
||||
use Drupal\Core\Entity\ContentEntityBase;
|
||||
use Drupal\Core\Entity\EntityTypeInterface;
|
||||
use Drupal\Core\Field\BaseFieldDefinition;
|
||||
|
||||
/**
|
||||
* Defines the test entity class.
|
||||
*
|
||||
* @ContentEntityType(
|
||||
* id = "no_language_entity_test",
|
||||
* label = @Translation("Test entity without language support"),
|
||||
* base_table = "no_language_entity_test",
|
||||
* persistent_cache = FALSE,
|
||||
* entity_keys = {
|
||||
* "id" = "id",
|
||||
* "uuid" = "uuid",
|
||||
* },
|
||||
* )
|
||||
*/
|
||||
class NoLanguageEntityTest extends ContentEntityBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
|
||||
$fields['id'] = BaseFieldDefinition::create('integer')
|
||||
->setLabel(t('ID'))
|
||||
->setDescription(t('The ID of the test entity.'))
|
||||
->setReadOnly(TRUE)
|
||||
->setSetting('unsigned', TRUE);
|
||||
|
||||
$fields['uuid'] = BaseFieldDefinition::create('uuid')
|
||||
->setLabel(t('UUID'))
|
||||
->setDescription(t('The UUID of the test entity.'))
|
||||
->setReadOnly(TRUE);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
}
|
|
@ -88,26 +88,10 @@ class ContentLanguageSettingsUnitTest extends UnitTestCase {
|
|||
*/
|
||||
public function testCalculateDependencies() {
|
||||
// Mock the interfaces necessary to create a dependency on a bundle entity.
|
||||
$bundle_entity = $this->getMock('Drupal\Core\Config\Entity\ConfigEntityInterface');
|
||||
$bundle_entity->expects($this->any())
|
||||
->method('getConfigDependencyName')
|
||||
->will($this->returnValue('test.test_entity_type.id'));
|
||||
|
||||
$storage = $this->getMock('\Drupal\Core\Config\Entity\ConfigEntityStorageInterface');
|
||||
$storage->expects($this->any())
|
||||
->method('load')
|
||||
->with('test_bundle')
|
||||
->will($this->returnValue($bundle_entity));
|
||||
|
||||
$this->entityManager->expects($this->any())
|
||||
->method('getStorage')
|
||||
->with('bundle_entity_type')
|
||||
->will($this->returnValue($storage));
|
||||
|
||||
$target_entity_type = $this->getMock('\Drupal\Core\Entity\EntityTypeInterface');
|
||||
$target_entity_type->expects($this->any())
|
||||
->method('getBundleEntityType')
|
||||
->will($this->returnValue('bundle_entity_type'));
|
||||
->method('getBundleConfigDependency')
|
||||
->will($this->returnValue(array('type' => 'config', 'name' => 'test.test_entity_type.id')));
|
||||
|
||||
$this->entityManager->expects($this->any())
|
||||
->method('getDefinition')
|
||||
|
|
Reference in a new issue