mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Applied code formator
This commit is contained in:
		| @@ -33,9 +33,11 @@ class CollectionAttributTest extends TestCase | ||||
|         $this->assertNull($this->collection->setCollection($collection)); | ||||
|         $this->assertEquals($collection, $this->collection->getCollection()); | ||||
|     } | ||||
|      | ||||
|     public function testAdd():void{ | ||||
|         $mock = new class{}; | ||||
|  | ||||
|     public function testAdd(): void | ||||
|     { | ||||
|         $mock = new class() { | ||||
|         }; | ||||
|         $this->collection->setCollection(new ArrayCollection()); | ||||
|         $this->assertTrue($this->collection->getCollection()->add($mock)); | ||||
|         $this->assertEquals($mock, $this->collection->getCollection()->get(0)); | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Tests\Unit\Entity\Attribut; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| @@ -9,26 +10,27 @@ use App\Entity\Meta\RecieverInterface; | ||||
| class RecieverAttributTest extends TestCase | ||||
| { | ||||
|     /** | ||||
|      *  | ||||
|      * @var RecieverAttributInterface | ||||
|      */ | ||||
|     protected $reciever; | ||||
|      | ||||
|     public function setUp():void{ | ||||
|         $this->reciever = new class implements RecieverAttributInterface{ | ||||
|  | ||||
|     public function setUp(): void | ||||
|     { | ||||
|         $this->reciever = new class() implements RecieverAttributInterface { | ||||
|             use RecieverAttribut; | ||||
|         }; | ||||
|     } | ||||
|      | ||||
|     public function testConstructor():void{ | ||||
|  | ||||
|     public function testConstructor(): void | ||||
|     { | ||||
|         $this->expectException(\TypeError::class); | ||||
|         $this->reciever->getReciever(); | ||||
|     } | ||||
|      | ||||
|     public function testAccessors():void{ | ||||
|  | ||||
|     public function testAccessors(): void | ||||
|     { | ||||
|         $reciever = $this->createMock(RecieverInterface::class); | ||||
|         $this->assertNull($this->reciever->setReciever($reciever)); | ||||
|         $this->assertEquals($reciever, $this->reciever->getReciever()); | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1,14 +1,11 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Tests\Unit\Entity\Subscriber; | ||||
|  | ||||
| use App\Subscriber\SourceMenuSubscriber; | ||||
| use App\Subscriber\UserMenuSubscriber; | ||||
| use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; | ||||
| use Symfony\Component\Translation\Translator; | ||||
| use App\Event\Menu\MenuEvent; | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use Knp\Menu\FactoryInterface; | ||||
| use Knp\Menu\ItemInterface; | ||||
| use Symfony\Component\HttpFoundation\RequestStack; | ||||
| use Symfony\Component\HttpFoundation\Request; | ||||
| use Knp\Menu\MenuItem; | ||||
| @@ -16,9 +13,7 @@ use Knp\Menu\MenuFactory; | ||||
|  | ||||
| class SourceMenuSubscriberTest extends TestCase | ||||
| { | ||||
|  | ||||
|     /** | ||||
|      * | ||||
|      * @var SourceMenuSubscriber | ||||
|      */ | ||||
|     public $subscriber; | ||||
| @@ -28,8 +23,9 @@ class SourceMenuSubscriberTest extends TestCase | ||||
|         $translator = new Translator('en'); | ||||
|         $this->subscriber = new SourceMenuSubscriber($translator); | ||||
|     } | ||||
|      | ||||
|     public function testOnSourceMenuConfig():void{ | ||||
|  | ||||
|     public function testOnSourceMenuConfig(): void | ||||
|     { | ||||
|         $factory = new MenuFactory(); | ||||
|         $item = new MenuItem('test', $factory); | ||||
|         $request = new Request(); | ||||
| @@ -40,6 +36,3 @@ class SourceMenuSubscriberTest extends TestCase | ||||
|         $this->assertNull($this->subscriber->onSourceMenuConfigure($event)); | ||||
|     } | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user