mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 17:29:04 +00:00 
			
		
		
		
	Added test for menuevent
This commit is contained in:
		
							
								
								
									
										32
									
								
								application/tests/Unit/Event/Menu/MenuEventTest.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								application/tests/Unit/Event/Menu/MenuEventTest.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| <?php | ||||
|  | ||||
| namespace Event; | ||||
|  | ||||
| use PHPUnit\Framework\TestCase; | ||||
| use App\Event\Menu\MenuEvent; | ||||
| use Knp\Menu\FactoryInterface; | ||||
| use Knp\Menu\ItemInterface; | ||||
| use Symfony\Component\HttpFoundation\RequestStack; | ||||
|  | ||||
| class MenuEventTest extends TestCase | ||||
| { | ||||
|     /** | ||||
|      * @var MenuEvent | ||||
|      */ | ||||
|     protected $menuEvent; | ||||
|  | ||||
|     public function setUp(): void | ||||
|     { | ||||
|         $factory = $this->createMock(FactoryInterface::class); | ||||
|         $item = $this->createMock(ItemInterface::class); | ||||
|         $request = $this->createMock(RequestStack::class); | ||||
|         $this->menuEvent = new MenuEvent($factory, $item, $request); | ||||
|     } | ||||
|  | ||||
|     public function testConstructor(): void | ||||
|     { | ||||
|         $this->assertInstanceOf(FactoryInterface::class, $this->menuEvent->getFactory()); | ||||
|         $this->assertInstanceOf(ItemInterface::class, $this->menuEvent->getItem()); | ||||
|         $this->assertInstanceOf(RequestStack::class, $this->menuEvent->getRequest()); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user