function ChainEntityResolverTest::testResolverWithNoneResolved

Tests the resolve method with no matching resolvers.

@legacy-covers ::__construct @legacy-covers ::resolve

File

core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php, line 56

Class

ChainEntityResolverTest
Tests Drupal\serialization\EntityResolver\ChainEntityResolver.

Namespace

Drupal\Tests\serialization\Unit\EntityResolver

Code

public function testResolverWithNoneResolved() : void {
  $resolvers = [
    $this->createEntityResolverMock(),
    $this->createEntityResolverMock(),
  ];
  $resolver = new ChainEntityResolver($resolvers);
  $this->assertNull($resolver->resolve($this->testNormalizer, $this->testData, $this->testEntityType));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.