1 | <?php |
||||
2 | |||||
3 | namespace Crystoline\LaraRestApi\Tests; |
||||
4 | |||||
5 | use Tests\TestCase; |
||||
0 ignored issues
–
show
|
|||||
6 | use Illuminate\Foundation\Testing\RefreshDatabase; |
||||
0 ignored issues
–
show
The type
Illuminate\Foundation\Testing\RefreshDatabase was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||||
7 | |||||
8 | class RestApiTest extends TestCase |
||||
9 | { |
||||
10 | use RefreshDatabase; |
||||
11 | /** |
||||
12 | * A basic test example. |
||||
13 | * |
||||
14 | * @return void |
||||
15 | */ |
||||
16 | public function testStore() |
||||
17 | { |
||||
18 | $response = $this-action('POST', 'Crystoline\LaraRestApiTestController@yourAction', ['links' => 'link1 \n link2']); |
||||
0 ignored issues
–
show
The function
action was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
19 | // you can check if response was ok |
||||
20 | $this->assertTrue($response->isOk(), "Custom message if something went wrong"); |
||||
0 ignored issues
–
show
The method
isOk() does not exist on integer .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||
21 | // or if view received variable |
||||
22 | $this->assertViewHas('links', ['link1', 'link2']); |
||||
23 | } |
||||
24 | } |
||||
25 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths