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

InfluxDbEventTest::test_event_interface()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
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