Issue Generating Url In Unit Test
- Dominant language
- PHP
- Stars
- 9.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
Im experiencing some issues trying to generate the url in my tests.
with the following code I got the error `Error: Call to a member function getByName() on null`
```
public function testApiIsConfirured()
{
$response = $this->json('GET',app('Dingo\Api\Routing\UrlGenerator')->version('v1')->route('api.index'));
$response->assertStatus(200);
}
```
When I tried it using the version helper i go the following error `ReflectionException: Class api.url does not exist`
```
public function testApiIsConfirured()
{
$response = $this->json('GET',version('v1')->route('api.index'));
$response->assertStatus(200);
}
```
Im using laravel:5.4
Contributor guide
Assessment
This issue has not been assessed yet.