public function ChainEntityResolverTest::testResolverWithLastResolved in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest::testResolverWithLastResolved()
Test the resolve method with a matching resolver last.
@covers ::__construct @covers ::resolve
File
- core/
modules/ serialization/ tests/ src/ Unit/ EntityResolver/ ChainEntityResolverTest.php, line 102 - Contains \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest.
Class
- ChainEntityResolverTest
- @coversDefaultClass \Drupal\serialization\EntityResolver\ChainEntityResolver @group serialization
Namespace
Drupal\Tests\serialization\Unit\EntityResolverCode
public function testResolverWithLastResolved() {
$resolvers = array(
$this
->createEntityResolverMock(),
$this
->createEntityResolverMock(10),
);
$resolver = new ChainEntityResolver($resolvers);
$this
->assertSame(10, $resolver
->resolve($this->testNormalizer, $this->testData, $this->testEntityType));
}