diff --git a/tests/TestCase/Auth/FormAuthenticateTest.php b/tests/TestCase/Auth/FormAuthenticateTest.php new file mode 100644 index 00000000..b2b299aa --- /dev/null +++ b/tests/TestCase/Auth/FormAuthenticateTest.php @@ -0,0 +1,34 @@ + + */ + protected array $fixtures = [ + 'plugin.TinyAuth.Users', + ]; + + /** + * @return void + */ + public function testAuthenticate() { + $request = new ServerRequest(); + $request = $request->withData('username', 'dereuromark'); + $request = $request->withData('password', '123'); + + $object = new FormAuthenticate(new ComponentRegistry(new Controller($request))); + $result = $object->authenticate($request, new Response()); + $this->assertTrue((bool)$result); + } + +}