Completed
Push — master ( cb575d...8e212c )
by Alessandro
02:01
created

InfluxDbEventTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 13
rs 10
1
<?php
2
declare(strict_types=1);
3
namespace Algatux\InfluxDbBundle\unit\Events;
4
5
use Algatux\InfluxDbBundle\Events\InfluxDbEvent;
6
use Algatux\InfluxDbBundle\Model\PointsCollection;
7
use Algatux\InfluxDbBundle\Services\Clients\Contracts\ClientInterface;
8
use InfluxDB\Database;
9
10
class InfluxDbEventTest extends \PHPUnit_Framework_TestCase
11
{
12
13
    public function test_event_interface()
14
    {
15
        $event = new InfluxDbEvent(new PointsCollection([1,2,3]), Database::PRECISION_SECONDS, ClientInterface::HTTP_CLIENT);
16
17
        $this->assertEquals(new PointsCollection([1,2,3]), $event->getPoints());
18
        $this->assertEquals(ClientInterface::HTTP_CLIENT, $event->getWriteClient());
19
        $this->assertEquals(Database::PRECISION_SECONDS, $event->getPayload());
20
    }
21
    
22
}
23