public function EntityTest::testResolvePublished in GraphQL 8.4
@covers \Drupal\graphql\Plugin\GraphQL\DataProducer\Entity\EntityPublished::resolve
File
- tests/
src/ Kernel/ DataProducer/ EntityTest.php, line 222
Class
- EntityTest
- Data producers Entity test class.
Namespace
Drupal\Tests\graphql\Kernel\DataProducerCode
public function testResolvePublished() : void {
$this->entity
->expects($this
->once())
->method('isPublished')
->willReturn(TRUE);
$this
->assertEquals(TRUE, $this
->executeDataProducer('entity_published', [
'entity' => $this->entity,
]));
$this
->assertNull($this
->executeDataProducer('entity_published', [
'entity' => $this->entity_interface,
]));
}