mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-10 06:27:24 +01:00
Applied code formator
This commit is contained in:
parent
00ae6412e6
commit
577f30e0f7
@ -8,8 +8,8 @@ use App\Entity\User;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Never execute this fixture on a livesystem!
|
* Never execute this fixture on a livesystem!
|
||||||
* @author kevinfrantz
|
|
||||||
*
|
*
|
||||||
|
* @author kevinfrantz
|
||||||
*/
|
*/
|
||||||
class DummyFixtures extends Fixture
|
class DummyFixtures extends Fixture
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Entity\Source\Data;
|
namespace App\Entity\Source\Data;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use App\Entity\Source\AbstractSource;
|
use App\Entity\Source\AbstractSource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
*
|
*
|
||||||
@ -13,6 +16,4 @@ use App\Entity\Source\AbstractSource;
|
|||||||
*/
|
*/
|
||||||
abstract class AbstractDataSource extends AbstractSource implements DataSourceInterface
|
abstract class AbstractDataSource extends AbstractSource implements DataSourceInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Entity\Source\Data;
|
namespace App\Entity\Source\Data;
|
||||||
|
|
||||||
use App\Entity\Source\SourceInterface;
|
use App\Entity\Source\SourceInterface;
|
||||||
@ -6,4 +7,3 @@ use App\Entity\Source\SourceInterface;
|
|||||||
interface DataSourceInterface extends SourceInterface
|
interface DataSourceInterface extends SourceInterface
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ namespace App\Entity\Source\Data;
|
|||||||
|
|
||||||
use App\Entity\Attribut\UserAttributInterface;
|
use App\Entity\Attribut\UserAttributInterface;
|
||||||
use App\Entity\Attribut\NameSourceAttributInterface;
|
use App\Entity\Attribut\NameSourceAttributInterface;
|
||||||
use App\Entity\Source\SourceInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Entity\Attribut;
|
namespace App\Entity\Attribut;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
@ -10,21 +11,23 @@ class NameAttributTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public $name;
|
public $name;
|
||||||
|
|
||||||
public function setUp():void{
|
public function setUp(): void
|
||||||
$this->name = new class implements NameAttributInterface{
|
{
|
||||||
|
$this->name = new class() implements NameAttributInterface {
|
||||||
use NameAttribut;
|
use NameAttribut;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConstructor():void{
|
public function testConstructor(): void
|
||||||
|
{
|
||||||
$this->expectException(\TypeError::class);
|
$this->expectException(\TypeError::class);
|
||||||
$this->name->getName();
|
$this->name->getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAccessors():void{
|
public function testAccessors(): void
|
||||||
$name = "hello world!";
|
{
|
||||||
|
$name = 'hello world!';
|
||||||
$this->assertNull($this->name->setName($name));
|
$this->assertNull($this->name->setName($name));
|
||||||
$this->assertEquals($name, $this->name->getName());
|
$this->assertEquals($name, $this->name->getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ class NameSourceTest extends TestCase
|
|||||||
$this->nameSource = new NameSource();
|
$this->nameSource = new NameSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConstructor():void{
|
public function testConstructor(): void
|
||||||
|
{
|
||||||
$this->assertInstanceOf(NameSourceInterface::class, $this->nameSource);
|
$this->assertInstanceOf(NameSourceInterface::class, $this->nameSource);
|
||||||
$this->expectException(\TypeError::class);
|
$this->expectException(\TypeError::class);
|
||||||
$this->nameSource->getName();
|
$this->nameSource->getName();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace tests\unit\Entity\Source\Data;
|
namespace tests\unit\Entity\Source\Data;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
@ -10,18 +11,18 @@ use App\Entity\Source\Data\NameSourceInterface;
|
|||||||
class UserSourceTest extends TestCase
|
class UserSourceTest extends TestCase
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @var UserSourceInterface
|
* @var UserSourceInterface
|
||||||
*/
|
*/
|
||||||
public $userSource;
|
public $userSource;
|
||||||
|
|
||||||
public function setUp():void{
|
public function setUp(): void
|
||||||
|
{
|
||||||
$this->userSource = new UserSource();
|
$this->userSource = new UserSource();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testConstructor():void {
|
public function testConstructor(): void
|
||||||
|
{
|
||||||
$this->assertInstanceOf(Collection::class, $this->userSource->getMemberships());
|
$this->assertInstanceOf(Collection::class, $this->userSource->getMemberships());
|
||||||
$this->assertInstanceOf(NameSourceInterface::class, $this->userSource->getNameSource());
|
$this->assertInstanceOf(NameSourceInterface::class, $this->userSource->getNameSource());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user