Completed
Pull Request — develop (#39)
by Axel
04:06
created

FeedbackRepositoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 3
dl 0
loc 17
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 8 1
A testCountPerStatus() 0 3 1
1
<?php
2
3
namespace Developtech\AgilityBundle\Tests\Repository;
4
5
use Developtech\AgilityBundle\DataFixtures\ORM\LoadProjectData;
6
use Developtech\AgilityBundle\DataFixtures\ORM\LoadFeedbackData;
7
8
use Liip\FunctionalTestBundle\Test\WebTestCase;
9
10
use Developtech\AgilityBundle\Entity\Project;
11
use Developtech\AgilityBundle\Entity\Feedback;
12
13
class FeedbackRepositoryTest extends WebTestCase {
14
    /** @var \AppBundle\Repository\Troop\TroopRepository **/
15
    protected $repository;
16
17
    public function setUp() {
18
        $this->repository = $this->getContainer()->get('doctrine')->getRepository(Feedback::class);
19
20
        $this->loadFixtures([
21
            LoadProjectData::class,
22
            LoadFeedbackData::class
23
        ]);
24
    }
25
26
    public function testCountPerStatus() {
27
        $this->assertEquals(2, $this->repository->countPerStatus((new Project())->setId(1), Feedback::STATUS_OPEN));
28
    }
29
}
30