Created
January 5, 2024 00:32
-
-
Save mmouih/6ca5d23979cedf7a7a208c6be7c039bf to your computer and use it in GitHub Desktop.
Testing handlers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use App\Handler\CreateOrUpdateUserHandler; | |
use App\Handler\HandlerInterface; | |
arch(sprintf('CreateOrUpdateUserHandler must implement %s', HandlerInterface::class)) | |
->expect(CreateOrUpdateUserHandler::class) | |
->toImplement(HandlerInterface::class); | |
arch('handlers must be final') | |
->expect('App\Handler') | |
->classes | |
->toBeFinal(); | |
arch(sprintf('All classes from Namespace App\Handler implement %s', HandlerInterface::class)) | |
->expect('App\Handler') | |
->toImplement(HandlerInterface::class); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment