mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +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!
|
||||
* @author kevinfrantz
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
class DummyFixtures extends Fixture
|
||||
{
|
||||
|
@ -1,7 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data;
|
||||
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
use App\Entity\Source\AbstractSource;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*
|
||||
@ -13,6 +16,4 @@ use App\Entity\Source\AbstractSource;
|
||||
*/
|
||||
abstract class AbstractDataSource extends AbstractSource implements DataSourceInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Source\Data;
|
||||
|
||||
use App\Entity\Source\SourceInterface;
|
||||
@ -6,4 +7,3 @@ use App\Entity\Source\SourceInterface;
|
||||
interface DataSourceInterface extends SourceInterface
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ use Symfony\Component\Validator\Constraints as Assert;
|
||||
* @ORM\Table(name="source_data_name")
|
||||
* @ORM\Entity(repositoryClass="App\Repository\NameSourceRepository")
|
||||
*/
|
||||
final class NameSource extends AbstractDataSource implements NameSourceInterface
|
||||
final class NameSource extends AbstractDataSource implements NameSourceInterface
|
||||
{
|
||||
use NameAttribut;
|
||||
|
||||
|
@ -4,7 +4,6 @@ namespace App\Entity\Source\Data;
|
||||
|
||||
use App\Entity\Attribut\UserAttributInterface;
|
||||
use App\Entity\Attribut\NameSourceAttributInterface;
|
||||
use App\Entity\Source\SourceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -9,22 +10,24 @@ class NameAttributTest extends TestCase
|
||||
* @var NameAttributInterface
|
||||
*/
|
||||
public $name;
|
||||
|
||||
public function setUp():void{
|
||||
$this->name = new class implements NameAttributInterface{
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->name = new class() implements NameAttributInterface {
|
||||
use NameAttribut;
|
||||
};
|
||||
}
|
||||
|
||||
public function testConstructor():void{
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->name->getName();
|
||||
}
|
||||
|
||||
public function testAccessors():void{
|
||||
$name = "hello world!";
|
||||
|
||||
public function testAccessors(): void
|
||||
{
|
||||
$name = 'hello world!';
|
||||
$this->assertNull($this->name->setName($name));
|
||||
$this->assertEquals($name, $this->name->getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,12 +21,13 @@ class NameSourceTest extends TestCase
|
||||
$this->nameSource = new NameSource();
|
||||
}
|
||||
|
||||
public function testConstructor():void{
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->assertInstanceOf(NameSourceInterface::class, $this->nameSource);
|
||||
$this->expectException(\TypeError::class);
|
||||
$this->nameSource->getName();
|
||||
}
|
||||
|
||||
|
||||
public function testName(): void
|
||||
{
|
||||
$name = 'Hello World!';
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace tests\unit\Entity\Source\Data;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@ -10,18 +11,18 @@ use App\Entity\Source\Data\NameSourceInterface;
|
||||
class UserSourceTest extends TestCase
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @var UserSourceInterface
|
||||
*/
|
||||
public $userSource;
|
||||
|
||||
public function setUp():void{
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
$this->userSource = new UserSource();
|
||||
}
|
||||
|
||||
public function testConstructor():void {
|
||||
|
||||
public function testConstructor(): void
|
||||
{
|
||||
$this->assertInstanceOf(Collection::class, $this->userSource->getMemberships());
|
||||
$this->assertInstanceOf(NameSourceInterface::class, $this->userSource->getNameSource());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user