Loading core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -96,8 +96,8 @@ public function testThirdPartySettings() { $this->assertSame('value 1', $this->plugin->getThirdPartySetting('the_module', 'the_key')); // When the section list is updated, also update the result returned. $section_list->setThirdPartySetting('the_module', 'the_key', 'value 2')->shouldBeCalled()->will(function ($args) { $this->getThirdPartySetting('the_module', 'the_key', NULL)->willReturn($args[2]); $section_list->setThirdPartySetting('the_module', 'the_key', 'value 2')->shouldBeCalled()->will(function (array $args) use ($section_list) { $section_list->getThirdPartySetting('the_module', 'the_key', NULL)->willReturn($args[2]); }); // Update the plugin value. Loading core/phpstan-baseline.neon +0 −25 Original line number Diff line number Diff line Loading @@ -1450,11 +1450,6 @@ parameters: count: 1 path: modules/language/tests/src/Functional/LanguageBreadcrumbTest.php - message: "#^Call to an undefined method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\DefaultsSectionStorageTest\\:\\:getThirdPartySetting\\(\\)\\.$#" count: 1 path: modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php - message: "#^Constructor of class Drupal\\\\link\\\\Plugin\\\\migrate\\\\process\\\\FieldLink has an unused parameter \\$migration\\.$#" count: 1 Loading Loading @@ -2920,16 +2915,6 @@ parameters: count: 2 path: tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php - message: "#^Call to an undefined method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDisplayFormBaseTest\\:\\:getComponent\\(\\)\\.$#" count: 3 path: tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php - message: "#^Call to an undefined method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDisplayFormBaseTest\\:\\:setComponent\\(\\)\\.$#" count: 1 path: tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php - message: "#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:createUser\\(\\) invoked with 4 parameters, 0\\-2 required\\.$#" count: 3 Loading Loading @@ -3120,16 +3105,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Database/InstallerObjectTest.php - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityFieldManagerTest\\:\\:get\\(\\)\\.$#" count: 3 path: tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityTypeBundleInfoTest\\:\\:get\\(\\)\\.$#" count: 1 path: tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php - message: "#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#" count: 3 Loading core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php +7 −7 Original line number Diff line number Diff line Loading @@ -37,9 +37,9 @@ public function testCopyFormValuesToEntity() { 'region' => 'hidden', ]; $entity->removeComponent('new_field_mismatch_type_visible') ->will(function ($args) { ->will(function (array $args) use ($entity) { // On subsequent calls, getComponent() will return an empty array. $this->getComponent($args[0])->willReturn([]); $entity->getComponent($args[0])->willReturn([]); }) ->shouldBeCalled(); Loading Loading @@ -76,9 +76,9 @@ public function testCopyFormValuesToEntity() { 'region' => 'hidden', ]; $entity->removeComponent('field_start_visible_change_region') ->will(function ($args) { ->will(function (array $args) use ($entity) { // On subsequent calls, getComponent() will return an empty array. $this->getComponent($args[0])->willReturn([]); $entity->getComponent($args[0])->willReturn([]); }) ->shouldBeCalled(); Loading @@ -105,16 +105,16 @@ public function testCopyFormValuesToEntity() { 'type' => 'textfield', 'region' => 'content', ]) ->will(function ($args) { ->will(function (array $args) use ($entity) { // On subsequent calls, getComponent() will return the newly set values. $this->getComponent($args[0])->willReturn($args[1]); $entity->getComponent($args[0])->willReturn($args[1]); $args[1] += [ 'settings' => [], 'third_party_settings' => [ 'foo' => 'bar', ], ]; $this->setComponent($args[0], $args[1])->shouldBeCalled(); $entity->setComponent($args[0], $args[1])->shouldBeCalled(); }) ->shouldBeCalled(); Loading core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +9 −6 Original line number Diff line number Diff line Loading @@ -431,13 +431,14 @@ public function testGetBaseFieldDefinitionsWithCaching() { $expected = ['id' => $field_definition]; $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn(FALSE) ->shouldBeCalled(); $this->cacheBackend->set('entity_base_field_definitions:test_entity_type:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_field_info']) ->will(function ($args) { ->will(function (array $args) use ($cacheBackend) { $data = (object) ['data' => $args[1]]; $this->get('entity_base_field_definitions:test_entity_type:en') $cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn($data) ->shouldBeCalled(); }) Loading @@ -458,6 +459,7 @@ public function testGetFieldDefinitionsWithCaching() { $expected = ['id' => $field_definition]; $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn((object) ['data' => $expected]) ->shouldBeCalledTimes(2); Loading @@ -465,9 +467,9 @@ public function testGetFieldDefinitionsWithCaching() { ->willReturn(FALSE) ->shouldBeCalledTimes(1); $this->cacheBackend->set('entity_bundle_field_definitions:test_entity_type:test_bundle:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_field_info']) ->will(function ($args) { ->will(function (array $args) use ($cacheBackend) { $data = (object) ['data' => $args[1]]; $this->get('entity_bundle_field_definitions:test_entity_type:test_bundle:en') $cacheBackend->get('entity_bundle_field_definitions:test_entity_type:test_bundle:en') ->willReturn($data) ->shouldBeCalled(); }) Loading Loading @@ -507,14 +509,15 @@ function () use ($definitions) { 'field_storage' => $field_storage_definition->reveal(), ]; $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn((object) ['data' => ['id' => $expected['id']]]) ->shouldBeCalledTimes(2); $this->cacheBackend->get('entity_field_storage_definitions:test_entity_type:en')->willReturn(FALSE); $this->cacheBackend->set('entity_field_storage_definitions:test_entity_type:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_field_info']) ->will(function () use ($expected) { $this->get('entity_field_storage_definitions:test_entity_type:en') ->will(function () use ($expected, $cacheBackend) { $cacheBackend->get('entity_field_storage_definitions:test_entity_type:en') ->willReturn((object) ['data' => $expected]) ->shouldBeCalled(); }) Loading core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php +3 −2 Original line number Diff line number Diff line Loading @@ -232,10 +232,11 @@ public function testGetAllBundleInfo() { 'banana' => $banana, ]); $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_bundle_info:en')->willReturn(FALSE); $this->cacheBackend->set('entity_bundle_info:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_bundles']) ->will(function () { $this->get('entity_bundle_info:en') ->will(function () use ($cacheBackend) { $cacheBackend->get('entity_bundle_info:en') ->willReturn((object) ['data' => 'cached data']) ->shouldBeCalled(); }) Loading Loading
core/modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php +2 −2 Original line number Diff line number Diff line Loading @@ -96,8 +96,8 @@ public function testThirdPartySettings() { $this->assertSame('value 1', $this->plugin->getThirdPartySetting('the_module', 'the_key')); // When the section list is updated, also update the result returned. $section_list->setThirdPartySetting('the_module', 'the_key', 'value 2')->shouldBeCalled()->will(function ($args) { $this->getThirdPartySetting('the_module', 'the_key', NULL)->willReturn($args[2]); $section_list->setThirdPartySetting('the_module', 'the_key', 'value 2')->shouldBeCalled()->will(function (array $args) use ($section_list) { $section_list->getThirdPartySetting('the_module', 'the_key', NULL)->willReturn($args[2]); }); // Update the plugin value. Loading
core/phpstan-baseline.neon +0 −25 Original line number Diff line number Diff line Loading @@ -1450,11 +1450,6 @@ parameters: count: 1 path: modules/language/tests/src/Functional/LanguageBreadcrumbTest.php - message: "#^Call to an undefined method Drupal\\\\Tests\\\\layout_builder\\\\Unit\\\\DefaultsSectionStorageTest\\:\\:getThirdPartySetting\\(\\)\\.$#" count: 1 path: modules/layout_builder/tests/src/Unit/DefaultsSectionStorageTest.php - message: "#^Constructor of class Drupal\\\\link\\\\Plugin\\\\migrate\\\\process\\\\FieldLink has an unused parameter \\$migration\\.$#" count: 1 Loading Loading @@ -2920,16 +2915,6 @@ parameters: count: 2 path: tests/Drupal/KernelTests/Core/Entity/EntityDecoupledTranslationRevisionsTest.php - message: "#^Call to an undefined method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDisplayFormBaseTest\\:\\:getComponent\\(\\)\\.$#" count: 3 path: tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php - message: "#^Call to an undefined method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityDisplayFormBaseTest\\:\\:setComponent\\(\\)\\.$#" count: 1 path: tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php - message: "#^Method Drupal\\\\KernelTests\\\\Core\\\\Entity\\\\EntityKernelTestBase\\:\\:createUser\\(\\) invoked with 4 parameters, 0\\-2 required\\.$#" count: 3 Loading Loading @@ -3120,16 +3105,6 @@ parameters: count: 1 path: tests/Drupal/Tests/Core/Database/InstallerObjectTest.php - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityFieldManagerTest\\:\\:get\\(\\)\\.$#" count: 3 path: tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php - message: "#^Call to an undefined method Drupal\\\\Tests\\\\Core\\\\Entity\\\\EntityTypeBundleInfoTest\\:\\:get\\(\\)\\.$#" count: 1 path: tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php - message: "#^Call to method getDefinitions\\(\\) on an unknown class Drupal\\\\Core\\\\Plugin\\\\CategorizingPluginManagerTrait\\.$#" count: 3 Loading
core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayFormBaseTest.php +7 −7 Original line number Diff line number Diff line Loading @@ -37,9 +37,9 @@ public function testCopyFormValuesToEntity() { 'region' => 'hidden', ]; $entity->removeComponent('new_field_mismatch_type_visible') ->will(function ($args) { ->will(function (array $args) use ($entity) { // On subsequent calls, getComponent() will return an empty array. $this->getComponent($args[0])->willReturn([]); $entity->getComponent($args[0])->willReturn([]); }) ->shouldBeCalled(); Loading Loading @@ -76,9 +76,9 @@ public function testCopyFormValuesToEntity() { 'region' => 'hidden', ]; $entity->removeComponent('field_start_visible_change_region') ->will(function ($args) { ->will(function (array $args) use ($entity) { // On subsequent calls, getComponent() will return an empty array. $this->getComponent($args[0])->willReturn([]); $entity->getComponent($args[0])->willReturn([]); }) ->shouldBeCalled(); Loading @@ -105,16 +105,16 @@ public function testCopyFormValuesToEntity() { 'type' => 'textfield', 'region' => 'content', ]) ->will(function ($args) { ->will(function (array $args) use ($entity) { // On subsequent calls, getComponent() will return the newly set values. $this->getComponent($args[0])->willReturn($args[1]); $entity->getComponent($args[0])->willReturn($args[1]); $args[1] += [ 'settings' => [], 'third_party_settings' => [ 'foo' => 'bar', ], ]; $this->setComponent($args[0], $args[1])->shouldBeCalled(); $entity->setComponent($args[0], $args[1])->shouldBeCalled(); }) ->shouldBeCalled(); Loading
core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +9 −6 Original line number Diff line number Diff line Loading @@ -431,13 +431,14 @@ public function testGetBaseFieldDefinitionsWithCaching() { $expected = ['id' => $field_definition]; $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn(FALSE) ->shouldBeCalled(); $this->cacheBackend->set('entity_base_field_definitions:test_entity_type:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_field_info']) ->will(function ($args) { ->will(function (array $args) use ($cacheBackend) { $data = (object) ['data' => $args[1]]; $this->get('entity_base_field_definitions:test_entity_type:en') $cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn($data) ->shouldBeCalled(); }) Loading @@ -458,6 +459,7 @@ public function testGetFieldDefinitionsWithCaching() { $expected = ['id' => $field_definition]; $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn((object) ['data' => $expected]) ->shouldBeCalledTimes(2); Loading @@ -465,9 +467,9 @@ public function testGetFieldDefinitionsWithCaching() { ->willReturn(FALSE) ->shouldBeCalledTimes(1); $this->cacheBackend->set('entity_bundle_field_definitions:test_entity_type:test_bundle:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_field_info']) ->will(function ($args) { ->will(function (array $args) use ($cacheBackend) { $data = (object) ['data' => $args[1]]; $this->get('entity_bundle_field_definitions:test_entity_type:test_bundle:en') $cacheBackend->get('entity_bundle_field_definitions:test_entity_type:test_bundle:en') ->willReturn($data) ->shouldBeCalled(); }) Loading Loading @@ -507,14 +509,15 @@ function () use ($definitions) { 'field_storage' => $field_storage_definition->reveal(), ]; $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_base_field_definitions:test_entity_type:en') ->willReturn((object) ['data' => ['id' => $expected['id']]]) ->shouldBeCalledTimes(2); $this->cacheBackend->get('entity_field_storage_definitions:test_entity_type:en')->willReturn(FALSE); $this->cacheBackend->set('entity_field_storage_definitions:test_entity_type:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_field_info']) ->will(function () use ($expected) { $this->get('entity_field_storage_definitions:test_entity_type:en') ->will(function () use ($expected, $cacheBackend) { $cacheBackend->get('entity_field_storage_definitions:test_entity_type:en') ->willReturn((object) ['data' => $expected]) ->shouldBeCalled(); }) Loading
core/tests/Drupal/Tests/Core/Entity/EntityTypeBundleInfoTest.php +3 −2 Original line number Diff line number Diff line Loading @@ -232,10 +232,11 @@ public function testGetAllBundleInfo() { 'banana' => $banana, ]); $cacheBackend = $this->cacheBackend; $this->cacheBackend->get('entity_bundle_info:en')->willReturn(FALSE); $this->cacheBackend->set('entity_bundle_info:en', Argument::any(), Cache::PERMANENT, ['entity_types', 'entity_bundles']) ->will(function () { $this->get('entity_bundle_info:en') ->will(function () use ($cacheBackend) { $cacheBackend->get('entity_bundle_info:en') ->willReturn((object) ['data' => 'cached data']) ->shouldBeCalled(); }) Loading