You've already forked Php-Template
feat: implement command bus with attribute-based handler resolution and add example command and handler
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m52s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m12s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m16s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 3m7s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m11s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m28s
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 2m52s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m12s
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m16s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 3m7s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m11s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m28s
This commit is contained in:
23
tests/GrpcHandlers/GreeterHandlerTest.php
Normal file
23
tests/GrpcHandlers/GreeterHandlerTest.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Siteworxpro\Tests\GrpcHandlers;
|
||||
|
||||
use Siteworxpro\Tests\Unit;
|
||||
use Spiral\RoadRunner\GRPC\ContextInterface;
|
||||
|
||||
class GreeterHandlerTest extends Unit
|
||||
{
|
||||
public function testSayHello(): void
|
||||
{
|
||||
$request = new \GRPC\Greeter\HelloRequest();
|
||||
$request->setName('World');
|
||||
|
||||
$context = \Mockery::mock(ContextInterface::class);
|
||||
|
||||
$handler = new \Siteworxpro\App\GrpcHandlers\GreeterHandler();
|
||||
$response = $handler->SayHello($context, $request);
|
||||
$this->assertEquals('Hello World', $response->getMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user