Closed ivybridge-3c33 closed 5 years ago
I got a problem on phpunit I'm design route as
/v1/outlet/{outlet_id}/test
$router->get('v1/outlets/{outlet_id}/test', function(){ return app('request')->route('outlet_id'); });
$router->get('v1/outlets/{outlet_id}/test', function(){
return app('request')->route('outlet_id');
});
It's working when i call it in postman or browser but in phpunit show out as error
Call to a member function parameter() on array test code
$req = $this->call('GET', '/v1/outlets/1/test'); dump($req->getContent()); $this->assertResponseStatus(200);
$req = $this->call('GET', '/v1/outlets/1/test');
dump($req->getContent());
$this->assertResponseStatus(200);
I just tagged Lumen v5.7.8 which should fix this. Can you upgrade and try again?
@driesvints Thank you
Description:
I got a problem on phpunit I'm design route as
/v1/outlet/{outlet_id}/test
$router->get('v1/outlets/{outlet_id}/test', function(){
return app('request')->route('outlet_id');
});
It's working when i call it in postman or browser but in phpunit show out as error
Call to a member function parameter() on array test code
$req = $this->call('GET', '/v1/outlets/1/test');
dump($req->getContent());
$this->assertResponseStatus(200);