Failed Conditions
Push — 2.7 ( 2d643e...f7c04a )
by Marco
29s queued 21s
created

ensureTestGeneratedDeprecationMessages()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Doctrine\Tests\ORM\Tools\Console\Command;
4
5
use Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand;
6
use Doctrine\ORM\Tools\EntityGenerator;
7
use Doctrine\Tests\OrmTestCase;
8
use Doctrine\Tests\VerifyDeprecations;
9
use Symfony\Component\Console\Output\OutputInterface;
10
11
class ConvertDoctrine1SchemaCommandTest extends OrmTestCase
12
{
13
    use VerifyDeprecations;
14
15
    /** @after */
16
    public function ensureTestGeneratedDeprecationMessages() : void
17
    {
18
        $this->assertHasDeprecationMessages();
19
    }
20
21
    public function testExecution()
22
    {
23
        $entityGenerator = $this->createMock(EntityGenerator::class);
24
        $command = new ConvertDoctrine1SchemaCommand();
0 ignored issues
show
Deprecated Code introduced by
The class Doctrine\ORM\Tools\Conso...tDoctrine1SchemaCommand has been deprecated: 3.0 This class is being removed from the ORM and won't have any replacement ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

24
        $command = /** @scrutinizer ignore-deprecated */ new ConvertDoctrine1SchemaCommand();
Loading history...
25
        $command->setEntityGenerator($entityGenerator);
26
27
        $output = $this->createMock(OutputInterface::class);
28
        $output->expects($this->once())
29
               ->method('writeln')
30
               ->with($this->equalTo('No Metadata Classes to process.'));
31
32
        $command->convertDoctrine1Schema([], sys_get_temp_dir(), 'annotation', 4, null, $output);
33
    }
34
}
35