put copyright text and add covers annotation in DIGeneratorTest
This commit is contained in:
@@ -1,12 +1,34 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Thelia */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : info@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* This program is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU General Public License as published by */
|
||||||
|
/* the Free Software Foundation; either version 3 of the License */
|
||||||
|
/* */
|
||||||
|
/* This program is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU General Public License */
|
||||||
|
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
/* */
|
||||||
|
/*************************************************************************************/
|
||||||
namespace Thelia\Tests\Tools;
|
namespace Thelia\Tests\Tools;
|
||||||
|
|
||||||
use Thelia\Tools\DIGenerator;
|
use Thelia\Tools\DIGenerator;
|
||||||
|
|
||||||
class DIGeneratorTest extends \PHPUnit_Framework_TestCase
|
class DIGeneratorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @covers DIGenerator::genDiModel
|
||||||
|
*/
|
||||||
public function testGenDiModelWithoutModels()
|
public function testGenDiModelWithoutModels()
|
||||||
{
|
{
|
||||||
$models = DIGenerator::genDiModel(__DIR__ . '/_filesEmpty');
|
$models = DIGenerator::genDiModel(__DIR__ . '/_filesEmpty');
|
||||||
@@ -14,6 +36,9 @@ class DIGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->assertEmpty($models);
|
$this->assertEmpty($models);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers DIGenerator::genDiModel
|
||||||
|
*/
|
||||||
public function testGenDiModelWithModels()
|
public function testGenDiModelWithModels()
|
||||||
{
|
{
|
||||||
$models = DIGenerator::genDiModel(__DIR__ . '/_files');
|
$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");
|
$this->assertCount(2, $models, "There is more than 2 models in this directory");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers DIGenerator::genDiModel
|
||||||
|
*/
|
||||||
public function testGenDiModelWithModelsAndExclusion()
|
public function testGenDiModelWithModelsAndExclusion()
|
||||||
{
|
{
|
||||||
$models = DIGenerator::genDiModel(__DIR__ . '/_files',array('B'));
|
$models = DIGenerator::genDiModel(__DIR__ . '/_files',array('B'));
|
||||||
@@ -34,6 +62,7 @@ class DIGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException RuntimeException
|
* @expectedException RuntimeException
|
||||||
|
* @covers DIGenerator::genDiModel
|
||||||
*/
|
*/
|
||||||
public function testGenDiModelWithWrongDirectory()
|
public function testGenDiModelWithWrongDirectory()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/*************************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* Thelia */
|
||||||
|
/* */
|
||||||
|
/* Copyright (c) OpenStudio */
|
||||||
|
/* email : info@thelia.net */
|
||||||
|
/* web : http://www.thelia.net */
|
||||||
|
/* */
|
||||||
|
/* This program is free software; you can redistribute it and/or modify */
|
||||||
|
/* it under the terms of the GNU General Public License as published by */
|
||||||
|
/* the Free Software Foundation; either version 3 of the License */
|
||||||
|
/* */
|
||||||
|
/* This program is distributed in the hope that it will be useful, */
|
||||||
|
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||||
|
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||||
|
/* GNU General Public License for more details. */
|
||||||
|
/* */
|
||||||
|
/* You should have received a copy of the GNU General Public License */
|
||||||
|
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
/* */
|
||||||
|
/*************************************************************************************/
|
||||||
namespace Thelia\Tools;
|
namespace Thelia\Tools;
|
||||||
|
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
||||||
|
|
||||||
class DIGenerator
|
class DIGenerator
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user