Loading test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/MySQLCodeGeneratorFactoryTest.phpdeleted 100644 → 0 +0 −22 Original line number Diff line number Diff line <?php namespace UnicaenDbImportUnitTest\CodeGenerator\MySQL; use UnicaenDbImport\CodeGenerator\MySQL\MySQLCodeGenerator; use UnicaenDbImport\CodeGenerator\MySQL\MySQLCodeGeneratorFactory; use Zend\ServiceManager\ServiceLocatorInterface; class MySQLCodeGeneratorFactoryTest extends \PHPUnit_Framework_TestCase { public function test_can_create_service() { /** @var ServiceLocatorInterface|\PHPUnit_Framework_MockObject_MockObject $sl */ $sl = $this->createMock(ServiceLocatorInterface::class); $sl->expects($this->never())->method('get'); $factory = new MySQLCodeGeneratorFactory(); $service = $factory->__invoke($sl); $this->assertInstanceOf(MySQLCodeGenerator::class, $service); } } No newline at end of file test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/MySQLCodeGeneratorTest.phpdeleted 100644 → 0 +0 −30 Original line number Diff line number Diff line <?php namespace UnicaenDbImportUnitTest\CodeGenerator\MySQL; use UnicaenDbImport\CodeGenerator\MySQL\MySQLCodeGenerator; use UnicaenDbImport\Domain\SourceInterface; use UnicaenDbImportUnitTest\CodeGenerator\CodeGeneratorAbstractTest; class MySQLCodeGeneratorTest extends CodeGeneratorAbstractTest { protected function setUp() { parent::setUp(); $this->codeGenerator = new MySQLCodeGenerator(); $this->dir = __DIR__; } /** * @return SourceInterface|\PHPUnit_Framework_MockObject_MockObject */ protected function createSourceMockFor_test_can_generate_sql_for_full_outer_join_select() { $source = parent::createSourceMockFor_test_can_generate_sql_for_full_outer_join_select(); $source->expects($this->once())->method('getColumns')->willReturn(['libelle', 'debut_validite', 'fin_validite']); return $source; } } No newline at end of file test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/expected_sql_for_insert_into_intermediate_table.sqldeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line insert into src_ztemptable (code, libelle, debut_validite, fin_validite) values ('A006', 'Libellé d''aujourd''hui (NB: l''apostrophe)', '2017-03-11', '2018-03-11'); No newline at end of file test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/expected_sql_for_intermediate_table_creation.sqldeleted 100644 → 0 +0 −3 Original line number Diff line number Diff line drop table if exists src_ztemptable CASCADE; create table src_ztemptable as select code, libelle, debut_validite, fin_validite from ztemptable; delete from src_ztemptable; No newline at end of file test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/expected_sql_for_select_from_source.sqldeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line select code, libelle, debut_validite, fin_validite from ztemptable; No newline at end of file Loading
test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/MySQLCodeGeneratorFactoryTest.phpdeleted 100644 → 0 +0 −22 Original line number Diff line number Diff line <?php namespace UnicaenDbImportUnitTest\CodeGenerator\MySQL; use UnicaenDbImport\CodeGenerator\MySQL\MySQLCodeGenerator; use UnicaenDbImport\CodeGenerator\MySQL\MySQLCodeGeneratorFactory; use Zend\ServiceManager\ServiceLocatorInterface; class MySQLCodeGeneratorFactoryTest extends \PHPUnit_Framework_TestCase { public function test_can_create_service() { /** @var ServiceLocatorInterface|\PHPUnit_Framework_MockObject_MockObject $sl */ $sl = $this->createMock(ServiceLocatorInterface::class); $sl->expects($this->never())->method('get'); $factory = new MySQLCodeGeneratorFactory(); $service = $factory->__invoke($sl); $this->assertInstanceOf(MySQLCodeGenerator::class, $service); } } No newline at end of file
test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/MySQLCodeGeneratorTest.phpdeleted 100644 → 0 +0 −30 Original line number Diff line number Diff line <?php namespace UnicaenDbImportUnitTest\CodeGenerator\MySQL; use UnicaenDbImport\CodeGenerator\MySQL\MySQLCodeGenerator; use UnicaenDbImport\Domain\SourceInterface; use UnicaenDbImportUnitTest\CodeGenerator\CodeGeneratorAbstractTest; class MySQLCodeGeneratorTest extends CodeGeneratorAbstractTest { protected function setUp() { parent::setUp(); $this->codeGenerator = new MySQLCodeGenerator(); $this->dir = __DIR__; } /** * @return SourceInterface|\PHPUnit_Framework_MockObject_MockObject */ protected function createSourceMockFor_test_can_generate_sql_for_full_outer_join_select() { $source = parent::createSourceMockFor_test_can_generate_sql_for_full_outer_join_select(); $source->expects($this->once())->method('getColumns')->willReturn(['libelle', 'debut_validite', 'fin_validite']); return $source; } } No newline at end of file
test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/expected_sql_for_insert_into_intermediate_table.sqldeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line insert into src_ztemptable (code, libelle, debut_validite, fin_validite) values ('A006', 'Libellé d''aujourd''hui (NB: l''apostrophe)', '2017-03-11', '2018-03-11'); No newline at end of file
test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/expected_sql_for_intermediate_table_creation.sqldeleted 100644 → 0 +0 −3 Original line number Diff line number Diff line drop table if exists src_ztemptable CASCADE; create table src_ztemptable as select code, libelle, debut_validite, fin_validite from ztemptable; delete from src_ztemptable; No newline at end of file
test/UnicaenDbImportUnitTest/CodeGenerator/MySQL/expected_sql_for_select_from_source.sqldeleted 100644 → 0 +0 −1 Original line number Diff line number Diff line select code, libelle, debut_validite, fin_validite from ztemptable; No newline at end of file