diff --git a/core/lib/Thelia/Tests/Tools/DIGeneratorTest.php b/core/lib/Thelia/Tests/Tools/DIGeneratorTest.php index e87905233..9edbef9e6 100644 --- a/core/lib/Thelia/Tests/Tools/DIGeneratorTest.php +++ b/core/lib/Thelia/Tests/Tools/DIGeneratorTest.php @@ -1,12 +1,34 @@ . */ +/* */ +/*************************************************************************************/ namespace Thelia\Tests\Tools; use Thelia\Tools\DIGenerator; class DIGeneratorTest extends \PHPUnit_Framework_TestCase { - + /** + * @covers DIGenerator::genDiModel + */ public function testGenDiModelWithoutModels() { $models = DIGenerator::genDiModel(__DIR__ . '/_filesEmpty'); @@ -14,6 +36,9 @@ class DIGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertEmpty($models); } + /** + * @covers DIGenerator::genDiModel + */ public function testGenDiModelWithModels() { $models = DIGenerator::genDiModel(__DIR__ . '/_files'); @@ -24,6 +49,9 @@ class DIGeneratorTest extends \PHPUnit_Framework_TestCase $this->assertCount(2, $models, "There is more than 2 models in this directory"); } + /** + * @covers DIGenerator::genDiModel + */ public function testGenDiModelWithModelsAndExclusion() { $models = DIGenerator::genDiModel(__DIR__ . '/_files',array('B')); @@ -34,6 +62,7 @@ class DIGeneratorTest extends \PHPUnit_Framework_TestCase /** * @expectedException RuntimeException + * @covers DIGenerator::genDiModel */ public function testGenDiModelWithWrongDirectory() { diff --git a/core/lib/Thelia/Tools/DIGenerator.php b/core/lib/Thelia/Tools/DIGenerator.php index c92547167..22d1ec4bf 100644 --- a/core/lib/Thelia/Tools/DIGenerator.php +++ b/core/lib/Thelia/Tools/DIGenerator.php @@ -1,9 +1,27 @@ . */ +/* */ +/*************************************************************************************/ namespace Thelia\Tools; -use Symfony\Component\DependencyInjection\ContainerBuilder; - class DIGenerator { /**