1
|
|
|
<?php |
2
|
|
|
declare(strict_types=1); |
3
|
|
|
|
4
|
|
|
namespace SlayerBirden\DFCodeGeneration\Command\Tests\Api; |
5
|
|
|
|
6
|
|
|
use SlayerBirden\DFCodeGeneration\Command\AbstractApiCommand; |
7
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\Config\Providers\Decorators\EntityIdDecorator; |
8
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\Config\Providers\Decorators\OwnerDecorator; |
9
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\Controllers\Providers\Decorators\RelationsProviderDecorator; |
10
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\DataProvider\BaseProvider; |
11
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\DataProvider\CachedProvider; |
12
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\DataProvider\DecoratedProvider; |
13
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\Tests\Api\DeleteGenerator; |
14
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\Tests\Api\Providers\Decorators\EntityDataDecorator; |
15
|
|
|
use SlayerBirden\DFCodeGeneration\Generator\Tests\Api\ReflectionEntitySpecProvider; |
16
|
|
|
use Symfony\Component\Console\Input\InputInterface; |
17
|
|
|
use Symfony\Component\Console\Output\OutputInterface; |
18
|
|
|
|
19
|
|
|
final class DeleteTestCommand extends AbstractApiCommand |
20
|
|
|
{ |
21
|
2 |
|
protected function configure() |
22
|
|
|
{ |
23
|
2 |
|
parent::configure(); |
24
|
2 |
|
$this->setName('test:api:delete') |
25
|
2 |
|
->setDescription('Api Test for delete action.') |
26
|
2 |
|
->setHelp('This command creates the Codeception Api Test for Delete Action for given entity.'); |
27
|
2 |
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* {@inheritdoc} |
31
|
|
|
* @param InputInterface $input |
32
|
|
|
* @param OutputInterface $output |
33
|
|
|
* @throws \Twig_Error_Loader |
34
|
|
|
* @throws \Twig_Error_Runtime |
35
|
|
|
* @throws \Twig_Error_Syntax |
36
|
|
|
*/ |
37
|
2 |
|
protected function execute(InputInterface $input, OutputInterface $output) |
38
|
|
|
{ |
39
|
2 |
|
$baseProvider = new BaseProvider($this->entityClassName); |
40
|
|
|
|
41
|
2 |
|
$generator = new DeleteGenerator( |
42
|
2 |
|
new CachedProvider( |
43
|
2 |
|
new DecoratedProvider( |
44
|
2 |
|
$baseProvider, |
45
|
2 |
|
new EntityDataDecorator( |
46
|
2 |
|
$this->entityClassName, |
47
|
2 |
|
new ReflectionEntitySpecProvider($this->entityClassName) |
48
|
|
|
), |
49
|
2 |
|
new EntityIdDecorator($this->entityClassName), |
50
|
2 |
|
new RelationsProviderDecorator($this->entityClassName), |
51
|
2 |
|
new OwnerDecorator($this->entityClassName) |
52
|
|
|
) |
53
|
|
|
) |
54
|
|
|
); |
55
|
2 |
|
$this->writer->write($generator->generate(), $generator->getFileName()); |
|
|
|
|
56
|
|
|
|
57
|
2 |
|
parent::execute($input, $output); |
58
|
2 |
|
} |
59
|
|
|
} |
60
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.