Verified Commit 17e5d9cf authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3226139 by Spokje, longwave: ->willReturn(...) would make more sense...

Issue #3226139 by Spokje, longwave: ->willReturn(...) would make more sense here (ding ding round 2)

(cherry picked from commit e30a948c)
parent 70cd4ec2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -92,16 +92,16 @@ public function testBuild() {
    $vocab_storage = $this->createMock('Drupal\Core\Entity\EntityStorageInterface');
    $vocab_storage->expects($this->any())
      ->method('load')
      ->will($this->returnValueMap([
      ->willReturnMap([
        ['forums', $prophecy->reveal()],
      ]));
      ]);

    $entity_type_manager = $this->createMock(EntityTypeManagerInterface::class);
    $entity_type_manager->expects($this->any())
      ->method('getStorage')
      ->will($this->returnValueMap([
      ->willReturnMap([
        ['taxonomy_vocabulary', $vocab_storage],
      ]));
      ]);

    $config_factory = $this->getConfigFactoryStub(
      [
+2 −2
Original line number Diff line number Diff line
@@ -543,9 +543,9 @@ protected function setupAccessArgumentsResolverFactory($constraint = NULL) {
        $resolver = $this->createMock('Drupal\Component\Utility\ArgumentsResolverInterface');
        $resolver->expects($this->any())
          ->method('getArguments')
          ->will($this->returnCallback(function ($callable) use ($route_match) {
          ->willReturnCallback(function ($callable) use ($route_match) {
            return [$route_match->getRouteObject()];
          }));
          });

        return $resolver;
      });
+2 −2
Original line number Diff line number Diff line
@@ -100,11 +100,11 @@ protected function setUp(): void {
  protected function setUpKeyValueEntityStorage($uuid_key = 'uuid') {
    $this->entityType->expects($this->atLeastOnce())
      ->method('getKey')
      ->will($this->returnValueMap([
      ->willReturnMap([
        ['id', 'id'],
        ['uuid', $uuid_key],
        ['langcode', 'langcode'],
      ]));
      ]);
    $this->entityType->expects($this->atLeastOnce())
      ->method('id')
      ->will($this->returnValue('test_entity_type'));