*/ declare(strict_types=1); namespace oat\taoDeliveryRdf\test\unit\model\Delete; use oat\generis\test\TestCase; use oat\taoDeliveryRdf\model\Delete\DeliveryDeleteRequest; class DeliveryDeleteRequestTest extends TestCase { private const DELIVERY_ID = 'testDeliveryId'; /** @var DeliveryDeleteRequest */ private $sut; /** * @before */ public function init(): void { $this->sut = new DeliveryDeleteRequest(self::DELIVERY_ID); } public function testGetDeliveryResource(): void { static::assertSame( self::DELIVERY_ID, $this->sut->getDeliveryResource()->getUri() ); } public function testDefaultScope(): void { static::assertTrue( $this->sut->isDeliveryRemovalRequested() ); static::assertTrue( $this->sut->isExecutionsRemovalRequested() ); static::assertFalse( $this->sut->isRecursive() ); } public function testScopeWithResourcesRemovalRequest(): void { $this->sut->setIsRecursive(); static::assertTrue( $this->sut->isDeliveryRemovalRequested() ); static::assertTrue( $this->sut->isExecutionsRemovalRequested() ); static::assertTrue( $this->sut->isRecursive() ); } public function testScopeWithDeliveryExecutionRemovalRequest(): void { $this->sut->setDeliveryExecutionsOnly(); static::assertFalse( $this->sut->isDeliveryRemovalRequested() ); static::assertTrue( $this->sut->isExecutionsRemovalRequested() ); static::assertFalse( $this->sut->isRecursive() ); } }