public function ChainEntityResolverTest::testResolverWithResolvedToZero in Drupal 10
Same name and namespace in other branches
- 8 core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest::testResolverWithResolvedToZero()
- 9 core/modules/serialization/tests/src/Unit/EntityResolver/ChainEntityResolverTest.php \Drupal\Tests\serialization\Unit\EntityResolver\ChainEntityResolverTest::testResolverWithResolvedToZero()
Tests the resolve method where one resolver returns 0.
@covers ::__construct @covers ::resolve
File
- core/
modules/ serialization/ tests/ src/ Unit/ EntityResolver/ ChainEntityResolverTest.php, line 114
Class
- ChainEntityResolverTest
- @coversDefaultClass \Drupal\serialization\EntityResolver\ChainEntityResolver @group serialization
Namespace
Drupal\Tests\serialization\Unit\EntityResolverCode
public function testResolverWithResolvedToZero() {
$resolvers = [
$this
->createEntityResolverMock(0),
$this
->createEntityResolverMock(NULL, FALSE),
];
$resolver = new ChainEntityResolver($resolvers);
$this
->assertSame(0, $resolver
->resolve($this->testNormalizer, $this->testData, $this->testEntityType));
}