Completed
Push — master ( 6e4d29...c8305f )
by Alessandro
02:31
created
tests/unit/DependencyInjection/ConfigurationTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Algatux\InfluxDbBundle\Tests\unit;
4 4
 
5 5
 use Algatux\InfluxDbBundle\DependencyInjection\Configuration;
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         $builtConf = $tree->buildTree();
18 18
 
19 19
         $this->assertInstanceOf(ArrayNode::class, $builtConf);
20
-        $this->assertEquals('influx_db',$builtConf->getName());
20
+        $this->assertEquals('influx_db', $builtConf->getName());
21 21
 
22 22
         $processor = new Processor();
23 23
 
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
         $this->assertArrayHasKey('http_port', $conf);
29 29
         $this->assertArrayHasKey('database', $conf);
30 30
 
31
-        $this->assertEquals('localhost',$conf['host']);
32
-        $this->assertEquals('4444',$conf['udp_port']);
33
-        $this->assertEquals('8086',$conf['http_port']);
34
-        $this->assertEquals('udp',$conf['database']);
31
+        $this->assertEquals('localhost', $conf['host']);
32
+        $this->assertEquals('4444', $conf['udp_port']);
33
+        $this->assertEquals('8086', $conf['http_port']);
34
+        $this->assertEquals('udp', $conf['database']);
35 35
     }
36 36
     
37 37
 }
Please login to merge, or discard this patch.
tests/unit/DependencyInjection/InfluxDbExtensionTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Algatux\InfluxDbBundle\unit\DependencyInjection;
4 4
 
5 5
 use Algatux\InfluxDbBundle\DependencyInjection\InfluxDbExtension;
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     public function test_load()
12 12
     {
13 13
         $extension = new InfluxDbExtension();
14
-        $config = $extension->load([],new ContainerBuilder());
14
+        $config = $extension->load([], new ContainerBuilder());
15 15
 
16 16
         $this->assertNotEmpty($config);
17 17
     }
Please login to merge, or discard this patch.
tests/unit/Events/InfluxDbEventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Algatux\InfluxDbBundle\unit\Events;
4 4
 
5 5
 use Algatux\InfluxDbBundle\Events\InfluxDbEvent;
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
 
13 13
     public function test_event_interface()
14 14
     {
15
-        $event = new InfluxDbEvent(new PointsCollection([1,2,3]), Database::PRECISION_SECONDS, ClientInterface::HTTP_CLIENT);
15
+        $event = new InfluxDbEvent(new PointsCollection([1, 2, 3]), Database::PRECISION_SECONDS, ClientInterface::HTTP_CLIENT);
16 16
 
17
-        $this->assertEquals(new PointsCollection([1,2,3]), $event->getPoints());
17
+        $this->assertEquals(new PointsCollection([1, 2, 3]), $event->getPoints());
18 18
         $this->assertEquals(ClientInterface::HTTP_CLIENT, $event->getWriteClient());
19 19
         $this->assertEquals(Database::PRECISION_SECONDS, $event->getPayload());
20 20
     }
Please login to merge, or discard this patch.
tests/unit/Events/Listeners/InfluxDbEventListenerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Algatux\InfluxDbBundle\Services\Clients\Contracts;
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
tests/unit/Services/Clients/InfluxDbClientFactoryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,28 +19,28 @@
 block discarded – undo
19 19
 
20 20
     public function test_client_factory_test_exists()
21 21
     {
22
-        $factory = new InfluxDbClientFactory(self::TEST_HOST,self::TEST_DB,self::TEST_UDP,self::TEST_HTTP);
22
+        $factory = new InfluxDbClientFactory(self::TEST_HOST, self::TEST_DB, self::TEST_UDP, self::TEST_HTTP);
23 23
         $this->assertInstanceOf(InfluxDbClientFactory::class, $factory);
24 24
     }
25 25
 
26 26
     public function test_build_udp_client_returns_a_valid_client()
27 27
     {
28
-        $factory = new InfluxDbClientFactory(self::TEST_HOST,self::TEST_DB,self::TEST_UDP,self::TEST_HTTP);
28
+        $factory = new InfluxDbClientFactory(self::TEST_HOST, self::TEST_DB, self::TEST_UDP, self::TEST_HTTP);
29 29
         $database = $factory->buildUdpClient();
30 30
 
31 31
         $this->assertInstanceOf(Database::class, $database);
32 32
         $this->assertEquals(self::TEST_DB, $database->getName());
33
-        $this->assertInstanceOf(UDP::class,$database->getClient()->getDriver());
33
+        $this->assertInstanceOf(UDP::class, $database->getClient()->getDriver());
34 34
     }
35 35
 
36 36
     public function test_build_http_client_returns_a_valid_client()
37 37
     {
38
-        $factory = new InfluxDbClientFactory(self::TEST_HOST,self::TEST_DB,self::TEST_UDP,self::TEST_HTTP);
38
+        $factory = new InfluxDbClientFactory(self::TEST_HOST, self::TEST_DB, self::TEST_UDP, self::TEST_HTTP);
39 39
         $database = $factory->buildHttpClient();
40 40
 
41 41
         $this->assertInstanceOf(Database::class, $database);
42 42
         $this->assertEquals(self::TEST_DB, $database->getName());
43
-        $this->assertInstanceOf(Guzzle::class,$database->getClient()->getDriver());
43
+        $this->assertInstanceOf(Guzzle::class, $database->getClient()->getDriver());
44 44
     }
45 45
 
46 46
 }
Please login to merge, or discard this patch.
tests/unit/Services/Clients/ReaderClientTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Algatux\InfluxDbBundle\Services\Clients\Contracts;
4 4
 
5 5
 /**
Please login to merge, or discard this patch.
tests/unit/Services/Clients/WriterClientTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 namespace Algatux\InfluxDbBundle\unit\Services\Clients;
4 4
 
5 5
 use Algatux\InfluxDbBundle\Model\PointsCollection;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function test_write()
38 38
     {
39 39
         $idbDatabase = $this->prophesize(Database::class);
40
-        $idbDatabase->writePoints(Argument::type('array'),Argument::type('string'))
40
+        $idbDatabase->writePoints(Argument::type('array'), Argument::type('string'))
41 41
             ->shouldBeCalledTimes(1)
42 42
             ->willReturn(true);
43 43
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $factory->buildHttpClient()->shouldBeCalledTimes(1)->willReturn($idbDatabase->reveal());
46 46
 
47 47
         $writer = new WriterClient($factory->reveal(), ClientInterface::HTTP_CLIENT);
48
-        $writer->write(new PointsCollection(),'test');
48
+        $writer->write(new PointsCollection(), 'test');
49 49
     }
50 50
     
51 51
 }
Please login to merge, or discard this patch.