mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-11-04 03:07:58 +00:00 
			
		
		
		
	Applied code formator
This commit is contained in:
		@@ -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());
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user