assertTrue(true); $this->getContainer()->bind(CommandBus::class, function () { return \Mockery::mock(CommandBus::class) ->shouldReceive('handle') ->andReturn('Hello World') ->getMock(); }); $controller = new IndexController(); $response = $controller->get($this->getMockRequest()); $this->assertEquals(200, $response->getStatusCode()); $this->assertEquals('{"message":"Server is running. Hello World"}', (string)$response->getBody()); } /** * @throws \JsonException */ public function testPost(): void { $this->assertTrue(true); $controller = new IndexController(); $response = $controller->post($this->getMockRequest()); $this->assertEquals(200, $response->getStatusCode()); $this->assertEquals('{"message":"POST request received"}', (string)$response->getBody()); } }