You are here

public function ChainEntityResolverTest::testResolverWithNoneResolvedUsingAddResolver in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest::testResolverWithNoneResolvedUsingAddResolver()
  2. 10 core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest::testResolverWithNoneResolvedUsingAddResolver()

Test the resolve method with no matching resolvers, using addResolver.

@covers ::addResolver @covers ::resolve

File

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

Class

ChainEntityResolverTest
@coversDefaultClass \Drupal\serialization\EntityResolver\ChainEntityResolver @group serialization

Namespace

Drupal\Tests\serialization\Unit\EntityResolver

Code

public function testResolverWithNoneResolvedUsingAddResolver() {
  $resolver = new ChainEntityResolver();
  $resolver
    ->addResolver($this
    ->createEntityResolverMock());
  $resolver
    ->addResolver($this
    ->createEntityResolverMock());
  $this
    ->assertNull($resolver
    ->resolve($this->testNormalizer, $this->testData, $this->testEntityType));
}