ApiPlatform\Core\Tests\DataProvider\ChainItemDataProviderTest::testGetItemExeptions PHP Method

testGetItemExeptions() public method

    public function testGetItemExeptions()
    {
        $firstDataProvider = $this->prophesize(ItemDataProviderInterface::class);
        $firstDataProvider->getItem('notfound', 1, null, [])->willThrow(ResourceClassNotSupportedException::class);
        $chainItemDataProvider = new ChainItemDataProvider([$firstDataProvider->reveal()]);
        $this->assertEquals('', $chainItemDataProvider->getItem('notfound', 1));
    }
ChainItemDataProviderTest