TasksTest::testFindToday()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GuillermoandraeTest\Highrise\Repositories;
4
5
use GuillermoandraeTest\Highrise\TestCase;
6
7
class TasksTest extends TestCase
8
{
9
    public function testFindAll()
10
    {
11
        $body = $this->getMockModelsXml('task');
12
        $repository = $this->getMockRepository('tasks', $body);
13
        $repository->findAll();
14
        $this->assertSameLastRequestUri('/tasks/all.xml', $repository);
15
    }
16
17
    public function testFindBy()
18
    {
19
        $body = $this->getMockModelsXml('task');
20
        $repository = $this->getMockRepository('tasks', $body);
21
        $repository->findBy('people', 3);
0 ignored issues
show
Bug introduced by
The method findBy() does not exist on Guillermoandrae\Repositories\RepositoryInterface. Did you maybe mean findById()? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

21
        $repository->/** @scrutinizer ignore-call */ 
22
                     findBy('people', 3);

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.

Loading history...
22
        $this->assertSameLastRequestUri('/people/3/tasks.xml', $repository);
23
    }
24
25
    public function testFindUpcoming()
26
    {
27
        $body = $this->getMockModelsXml('task');
28
        $repository = $this->getMockRepository('tasks', $body);
29
        $repository->findUpcoming();
0 ignored issues
show
Bug introduced by
The method findUpcoming() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...itories\TasksRepository or Guillermoandrae\Highrise...itories\TasksRepository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

29
        $repository->/** @scrutinizer ignore-call */ 
30
                     findUpcoming();
Loading history...
30
        $this->assertSameLastRequestUri('/tasks/upcoming.xml', $repository);
31
    }
32
33
    public function testFindAssigned()
34
    {
35
        $body = $this->getMockModelsXml('task');
36
        $repository = $this->getMockRepository('tasks', $body);
37
        $repository->findAssigned();
0 ignored issues
show
Bug introduced by
The method findAssigned() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...itories\TasksRepository or Guillermoandrae\Highrise...itories\TasksRepository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

37
        $repository->/** @scrutinizer ignore-call */ 
38
                     findAssigned();
Loading history...
38
        $this->assertSameLastRequestUri('/tasks/assigned.xml', $repository);
39
    }
40
41
    public function testFindCompleted()
42
    {
43
        $body = $this->getMockModelsXml('task');
44
        $repository = $this->getMockRepository('tasks', $body);
45
        $repository->findCompleted();
0 ignored issues
show
Bug introduced by
The method findCompleted() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...itories\TasksRepository or Guillermoandrae\Highrise...itories\TasksRepository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

45
        $repository->/** @scrutinizer ignore-call */ 
46
                     findCompleted();
Loading history...
46
        $this->assertSameLastRequestUri('/tasks/completed.xml', $repository);
47
    }
48
49
    public function testFindToday()
50
    {
51
        $body = $this->getMockModelsXml('task');
52
        $repository = $this->getMockRepository('tasks', $body);
53
        $repository->findToday();
0 ignored issues
show
Bug introduced by
The method findToday() does not exist on Guillermoandrae\Repositories\RepositoryInterface. It seems like you code against a sub-type of Guillermoandrae\Repositories\RepositoryInterface such as Guillermoandrae\Highrise...itories\TasksRepository or Guillermoandrae\Highrise...itories\TasksRepository. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

53
        $repository->/** @scrutinizer ignore-call */ 
54
                     findToday();
Loading history...
54
        $this->assertSameLastRequestUri('/tasks/today.xml', $repository);
55
    }
56
}
57