diff --git a/core/modules/hal/src/Tests/NormalizeTest.php b/core/modules/hal/src/Tests/NormalizeTest.php index 72ed06e..39678e3 100644 --- a/core/modules/hal/src/Tests/NormalizeTest.php +++ b/core/modules/hal/src/Tests/NormalizeTest.php @@ -49,7 +49,7 @@ public function testNormalize() { 'name' => $this->randomMachineName(), 'field_test_entity_reference' => array( 'target_id' => $target_entity_en->id(), - ), + ) ); $entity = entity_create('entity_test', $values); @@ -68,7 +68,7 @@ public function testNormalize() { array( 'href' => '/relations', 'name' => 'site', - 'templated' => TRUE, + 'templated' => true, ), ), 'self' => array( @@ -167,7 +167,7 @@ public function testNormalize() { /** * Constructs the entity URI. * - * @param object $entity + * @param $entity * The entity. * * @return string diff --git a/core/modules/language/src/Tests/LanguageListTest.php b/core/modules/language/src/Tests/LanguageListTest.php index 7fa533a..1ebb39f 100644 --- a/core/modules/language/src/Tests/LanguageListTest.php +++ b/core/modules/language/src/Tests/LanguageListTest.php @@ -66,7 +66,7 @@ function testLanguageList() { ); $this->drupalPostForm('admin/config/regional/language/add', $edit, t('Add custom language')); $this->assertUrl(\Drupal::url('language.admin_overview', [], ['absolute' => TRUE])); - $this->assertRaw('"edit-languages-' . $langcode . '-weight"', 'Language code found.'); + $this->assertRaw('"edit-languages-' . $langcode .'-weight"', 'Language code found.'); $this->assertText(t($name), 'Test language added.'); $language = \Drupal::service('language_manager')->getLanguage($langcode); diff --git a/core/modules/system/src/Tests/Entity/EntityTranslationTest.php b/core/modules/system/src/Tests/Entity/EntityTranslationTest.php index d1f5eaa..d91a136 100644 --- a/core/modules/system/src/Tests/Entity/EntityTranslationTest.php +++ b/core/modules/system/src/Tests/Entity/EntityTranslationTest.php @@ -152,11 +152,7 @@ protected function doTestMultilingualProperties($entity_type) { // Create a language neutral entity and check that properties are stored // as language neutral. - $entity = entity_create($entity_type, array( - 'name' => $name, - 'user_id' => $uid, - $langcode_key => LanguageInterface::LANGCODE_NOT_SPECIFIED) - ); + $entity = entity_create($entity_type, array('name' => $name, 'user_id' => $uid, $langcode_key => LanguageInterface::LANGCODE_NOT_SPECIFIED)); $entity->save(); $entity = entity_load($entity_type, $entity->id()); $default_langcode = $entity->language()->getId(); @@ -176,11 +172,7 @@ protected function doTestMultilingualProperties($entity_type) { // Create a language-aware entity and check that properties are stored // as language-aware. - $entity = entity_create($entity_type, array( - 'name' => $name, - 'user_id' => $uid, - $langcode_key => $langcode) - ); + $entity = entity_create($entity_type, array('name' => $name, 'user_id' => $uid, $langcode_key => $langcode)); $entity->save(); $entity = entity_load($entity_type, $entity->id()); $default_langcode = $entity->language()->getId(); @@ -263,11 +255,7 @@ protected function doTestMultilingualProperties($entity_type) { $entities = entity_load_multiple_by_properties($entity_type, array($langcode_key => $langcode, 'name' => $properties[$langcode]['name'][0])); $this->assertEqual(count($entities), 0, format_string('%entity_type: No entity loaded by name translation specifying the translation language.', array('%entity_type' => $entity_type))); - $entities = entity_load_multiple_by_properties($entity_type, array( - $langcode_key => $langcode, - 'name' => $properties[$langcode]['name'][0], - 'default_langcode' => 0, - )); + $entities = entity_load_multiple_by_properties($entity_type, array($langcode_key => $langcode, 'name' => $properties[$langcode]['name'][0], 'default_langcode' => 0)); $this->assertEqual(count($entities), 1, format_string('%entity_type: One entity loaded by name translation and language specifying to look for translations.', array('%entity_type' => $entity_type))); $entities = entity_load_multiple_by_properties($entity_type, array('user_id' => $properties[$langcode]['user_id'][0], 'default_langcode' => NULL)); $this->assertEqual(count($entities), 2, format_string('%entity_type: Two entities loaded by uid without caring about property translatability.', array('%entity_type' => $entity_type))); @@ -307,7 +295,7 @@ protected function doTestMultilingualProperties($entity_type) { /** * Tests the Entity Translation API behavior. */ - protected function testEntityTranslationAPI() { + function testEntityTranslationAPI() { // Test all entity variations with data table support. foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) { $this->doTestEntityTranslationAPI($entity_type); @@ -487,7 +475,7 @@ protected function doTestEntityTranslationAPI($entity_type) { /** * Tests language fallback applied to field and entity translations. */ - protected function testLanguageFallback() { + function testLanguageFallback() { // Test all entity variations with data table support. foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) { $this->doTestLanguageFallback($entity_type);