Test Failed
Push — master ( e493eb...f216b4 )
by Alexey
02:56
created

EventsControllerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testHasEvents() 0 20 1
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\Tests\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
6
7
class EventsControllerTest extends WebTestCase
8
{
9
    public function testHasEvents()
10
    {
11
        $client = static::createClient();
12
13
        $crawler = $client->request('GET', '/events/last');
14
15
        // Checking that we have events table
16
        $this->assertEquals(
17
            1,
18
            $crawler->filter('.last-subscriptions-log table')->count(),
19
            'Has no events table'
20
        );
21
22
        // Checking that we have at least one event in the table
23
        $this->assertGreaterThan(
24
            0,
25
            $crawler->filter('.last-subscriptions-log table')->children()->filter('tbody')->children()->count(),
26
            'No events shown in the table'
27
        );
28
    }
29
30
    // @todo test pagination
31
}