Completed
Push — master ( 18696f...4ea9b4 )
by Serhii
04:47 queued 11s
created

RepertoireSeasonRepositoryTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testFindAllNotEmpty() 0 11 1
A testFindCurrentSeason() 0 10 1
1
<?php
2
3
namespace App\Tests\Functional\Repository;
4
5
use App\Entity\RepertoireSeason;
6
use App\Repository\RepertoireSeasonRepository;
7
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
8
9
class RepertoireSeasonRepositoryTest extends WebTestCase
10
{
11
    public function testFindAllNotEmpty()
12
    {
13
        self::bootKernel();
14
        $seasons = self::$container
15
            ->get(RepertoireSeasonRepository::class)
16
            ->findAllNotEmpty();
17
18
        $this->assertIsArray($seasons);
19
        $this->assertNotEmpty($seasons);
20
        $this->assertInstanceOf(RepertoireSeason::class, $seasons[0]);
21
    }
22
23
    public function testFindCurrentSeason()
24
    {
25
        self::bootKernel();
26
        $season = self::$container
27
            ->get(RepertoireSeasonRepository::class)
28
            ->findCurrentSeason();
29
30
        $this->assertNotNull($season);
31
        $this->assertInstanceOf(RepertoireSeason::class, $season);
32
    }
33
}
34