1
0
mirror of synced 2025-02-03 13:59:27 +03:00
doctrine2/tests/Doctrine/Tests/ORM/Tools/Console/Command/ConvertDoctrine1SchemaCommandTest.php
Sebastian Bergmann 9da83cfae8 Make test suite compatible with PHPUnit 5.4.
* Use createMock() and getMockBuilder() instead of getMock()
* Use expectException() and expectExceptionMessage() instead of setExpectedException()
2016-06-18 13:01:59 +02:00

26 lines
866 B
PHP

<?php
namespace Doctrine\Tests\ORM\Tools\Console\Command;
use Doctrine\ORM\Tools\Console\Command\ConvertDoctrine1SchemaCommand;
use Doctrine\ORM\Tools\EntityGenerator;
use Doctrine\Tests\OrmTestCase;
use Symfony\Component\Console\Output\OutputInterface;
class ConvertDoctrine1SchemaCommandTest extends OrmTestCase
{
public function testExecution()
{
$entityGenerator = $this->createMock(EntityGenerator::class);
$command = new ConvertDoctrine1SchemaCommand();
$command->setEntityGenerator($entityGenerator);
$output = $this->createMock(OutputInterface::class);
$output->expects($this->once())
->method('writeln')
->with($this->equalTo('No Metadata Classes to process.'));
$command->convertDoctrine1Schema(array(), sys_get_temp_dir(), 'annotation', 4, null, $output);
}
}