diff --git a/tests/Commands/Invite/ClaimInviteCommandTest.php b/tests/Commands/Invite/ClaimInviteCommandTest.php new file mode 100644 index 00000000..f8252ee6 --- /dev/null +++ b/tests/Commands/Invite/ClaimInviteCommandTest.php @@ -0,0 +1,41 @@ + + */ +class ClaimInviteCommandTest extends AbstractTestCase +{ + use CommandTrait; + + protected function getObjectAndParams() + { + $params = ['invite' => new Invite()]; + $object = new ClaimInviteCommand($params['invite']); + + return compact('params', 'object'); + } + + protected function getHandlerClass() + { + return ClaimInviteCommandHandler::class; + } +} diff --git a/tests/Commands/User/InviteTeamMemberCommandTest.php b/tests/Commands/User/InviteTeamMemberCommandTest.php new file mode 100644 index 00000000..0a787d31 --- /dev/null +++ b/tests/Commands/User/InviteTeamMemberCommandTest.php @@ -0,0 +1,45 @@ + + */ +class InviteTeamMemberCommandTest extends AbstractTestCase +{ + use CommandTrait; + + protected function getObjectAndParams() + { + $params = ['emails' => ['foo@example.com']]; + $object = new InviteTeamMemberCommand($params['emails']); + + return compact('params', 'object'); + } + + protected function objectHasRules() + { + return true; + } + + protected function getHandlerClass() + { + return InviteTeamMemberCommandHandler::class; + } +} diff --git a/tests/Commands/User/SignupUserCommandTest.php b/tests/Commands/User/SignupUserCommandTest.php new file mode 100644 index 00000000..6f4b8182 --- /dev/null +++ b/tests/Commands/User/SignupUserCommandTest.php @@ -0,0 +1,56 @@ + + */ +class SignupUserCommandTest extends AbstractTestCase +{ + use CommandTrait; + + protected function getObjectAndParams() + { + $params = [ + 'username' => 'Test', + 'password' => 'fooey', + 'email' => 'test@test.com', + 'level' => 1, + ]; + + $object = new SignupUserCommand( + $params['username'], + $params['password'], + $params['email'], + $params['level'] + ); + + return compact('params', 'object'); + } + + protected function objectHasRules() + { + return true; + } + + protected function getHandlerClass() + { + return SignupUserCommandHandler::class; + } +}