mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Applied CS fixer
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\Entity\Source;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -10,9 +11,7 @@ use Doctrine\Common\Collections\ArrayCollection;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
class AbstractSourceTest extends TestCase
|
||||
{
|
||||
@@ -21,30 +20,36 @@ class AbstractSourceTest extends TestCase
|
||||
* @var SourceInterface
|
||||
*/
|
||||
protected $source;
|
||||
|
||||
public function setUp(){
|
||||
$this->source = new class extends \App\Entity\Source\AbstractSource{};
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$this->source = new class() extends \App\Entity\Source\AbstractSource {
|
||||
};
|
||||
$this->source->setId(self::ID);
|
||||
}
|
||||
|
||||
public function testId(){
|
||||
$this->assertEquals($this->source->getId(),self::ID);
|
||||
|
||||
public function testId()
|
||||
{
|
||||
$this->assertEquals($this->source->getId(), self::ID);
|
||||
}
|
||||
|
||||
public function testLaw(){
|
||||
$this->assertInstanceOf(LawInterface::class,$this->source->getLaw());
|
||||
|
||||
public function testLaw()
|
||||
{
|
||||
$this->assertInstanceOf(LawInterface::class, $this->source->getLaw());
|
||||
}
|
||||
|
||||
public function testRelation(){
|
||||
$this->assertInstanceOf(RelationInterface::class,$this->source->getRelation());
|
||||
|
||||
public function testRelation()
|
||||
{
|
||||
$this->assertInstanceOf(RelationInterface::class, $this->source->getRelation());
|
||||
}
|
||||
|
||||
public function testGroups(){
|
||||
$this->assertInstanceOf(Collection::class,$this->source->getGroupSources());
|
||||
$group = new class extends AbstractSource{};
|
||||
|
||||
public function testGroups()
|
||||
{
|
||||
$this->assertInstanceOf(Collection::class, $this->source->getGroupSources());
|
||||
$group = new class() extends AbstractSource {
|
||||
};
|
||||
$groups = new ArrayCollection([$group]);
|
||||
$this->source->setGroupSources($groups);
|
||||
$this->assertEquals($group, $this->source->getGroupSources()->get(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user