Refactored reciever group and adapted testing namespaces

This commit is contained in:
Kevin Frantz
2018-10-31 16:15:39 +01:00
parent 09cfcebb92
commit bb01080b34
17 changed files with 90 additions and 140 deletions

View File

@@ -1,8 +1,10 @@
<?php
namespace App\Entity;
namespace tests\unit\Entity;
use PHPUnit\Framework\TestCase;
use App\Entity\EntityInterface;
use App\Entity\AbstractEntity;
class AbstractEntityTest extends TestCase
{

View File

@@ -1,10 +1,13 @@
<?php
namespace App\Entity\Meta;
namespace tests\unit\Entity\Meta;
use PHPUnit\Framework\TestCase;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Meta\LawInterface;
use App\Entity\Meta\Law;
use App\Entity\Meta\Right;
class LawTest extends TestCase
{

View File

@@ -0,0 +1,24 @@
<?php
namespace App\tests\unit\Entity\Meta;
use PHPUnit\Framework\TestCase;
use Doctrine\Common\Collections\Collection;
use App\Entity\Meta\Reciever;
use App\Entity\Meta\RecieverInterface;
class RecieverTest extends TestCase
{
/**
*
* @var RecieverInterface
*/
public $reciever;
public function setUp():void{
$this->reciever = new Reciever();
}
public function testConstructor():void {
$this->assertEquals(Collection::class, $this->reciever->getAllRecievers());
}
}

View File

@@ -1,9 +1,12 @@
<?php
namespace App\Entity\Meta;
namespace tests\unit\Entity;
use PHPUnit\Framework\TestCase;
use App\DBAL\Types\RightType;
use App\Entity\Meta\RightInterface;
use App\Entity\Meta\Right;
use App\Entity\Meta\Law;
/**
* @todo Implement reciever test

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Entity\Source\Operand;
namespace tests\unit\Entity\Source\Operand;
use PHPUnit\Framework\TestCase;
use App\Entity\Source\Operation\AbstractOperation;

View File

@@ -1,6 +1,6 @@
<?php
namespace App\Entity\Source\Operation;
namespace tests\unit\Entity\Source\Operation;
use PHPUnit\Framework\TestCase;
use App\Exception\NotDefinedException;
@@ -8,6 +8,8 @@ use App\Logic\Result\Result;
use App\Logic\Operation\OperandInterface;
use App\Logic\Result\ResultInterface;
use Doctrine\Common\Collections\ArrayCollection;
use App\Entity\Source\Operation\OperationInterface;
use App\Entity\Source\Operation\AndOperation;
class AndOperationTest extends TestCase
{