- Implemented unit tests for the Package model, covering methods such as generateId, findById, findByName, and version management. - Created unit tests for the Repository model, including repository creation, name validation, and retrieval methods. - Added tests for the Session model, focusing on session creation, validation, and invalidation. - Developed unit tests for the User model, ensuring user creation, password hashing, and retrieval methods function correctly. - Implemented AuthService tests, validating login, token refresh, and session management. - Added TokenService tests, covering token creation, validation, and revocation processes.
21 lines
355 B
PHP
21 lines
355 B
PHP
<?php
|
|
|
|
namespace StackTest\DemoPackage;
|
|
|
|
/**
|
|
* Demo class for Stack.Gallery Registry e2e tests.
|
|
*/
|
|
class Demo
|
|
{
|
|
/**
|
|
* Greet the given name.
|
|
*
|
|
* @param string $name The name to greet
|
|
* @return string A greeting message
|
|
*/
|
|
public static function greet(string $name): string
|
|
{
|
|
return "Hello, {$name}!";
|
|
}
|
|
}
|