/
DeleteProcessorTestCase.php
34 lines (26 loc) · 1.19 KB
/
DeleteProcessorTestCase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
namespace Oro\Bundle\ApiBundle\Tests\Unit\Processor\Delete;
use Oro\Bundle\ApiBundle\Processor\Delete\DeleteContext;
use Oro\Bundle\ApiBundle\Provider\ConfigProvider;
use Oro\Bundle\ApiBundle\Provider\MetadataProvider;
use Oro\Bundle\ApiBundle\Request\ApiAction;
use Oro\Bundle\ApiBundle\Request\RequestType;
class DeleteProcessorTestCase extends \PHPUnit\Framework\TestCase
{
protected const TEST_VERSION = '1.1';
protected const TEST_REQUEST_TYPE = RequestType::REST;
protected DeleteContext $context;
/** @var \PHPUnit\Framework\MockObject\MockObject|ConfigProvider */
protected $configProvider;
/** @var \PHPUnit\Framework\MockObject\MockObject|MetadataProvider */
protected $metadataProvider;
protected function setUp(): void
{
$this->configProvider = $this->createMock(ConfigProvider::class);
$this->metadataProvider = $this->createMock(MetadataProvider::class);
$this->context = new DeleteContext($this->configProvider, $this->metadataProvider);
$this->context->setAction(ApiAction::DELETE);
$this->context->setVersion(self::TEST_VERSION);
$this->context->getRequestType()->add(self::TEST_REQUEST_TYPE);
}
}