put copyright text and add covers annotation in DIGeneratorTest

This commit is contained in:
Manuel Raynaud
2012-12-28 12:00:47 +01:00
parent 10e41f3a99
commit 911146255f
2 changed files with 52 additions and 5 deletions

View File

@@ -1,12 +1,34 @@
<?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;
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()
{

View File

@@ -1,9 +1,27 @@
<?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;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class DIGenerator
{
/**