public function EntityTest::testResolveUrl in GraphQL 8.4
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\EntityUrl::resolve
File
- tests/
src/ Kernel/ DataProducer/ EntityTest.php, line 275
Class
- EntityTest
- Data producers Entity test class.
Namespace
Drupal\Tests\graphql\Kernel\DataProducerCode
public function testResolveUrl() : void {
$url = $this
->getMockBuilder(Url::class)
->disableOriginalConstructor()
->getMock();
$this->entity
->expects($this
->once())
->method('toUrl')
->willReturn($url);
$this
->assertEquals($url, $this
->executeDataProducer('entity_url', [
'entity' => $this->entity,
]));
}