| Conditions | 2 |
| Paths | 2 |
| Total Lines | 33 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types = 1); |
||
| 16 | public function testFunctionality(): void |
||
| 17 | { |
||
| 18 | if (getenv('TRAVIS') !== false) { |
||
| 19 | $this->markTestSkipped('EET is blocking Travis CI :('); |
||
| 20 | } |
||
| 21 | $crypto = new CryptographyService(__DIR__ . '/../../cert/EET_CA1_Playground-CZ00000019.key', __DIR__ . '/../../cert/EET_CA1_Playground-CZ00000019.pub'); |
||
| 22 | $configuration = new Configuration('CZ00000019', '273', '/5546/RO24', EvidenceEnvironment::get(EvidenceEnvironment::PLAYGROUND), false); |
||
| 23 | $client = new Client( |
||
| 24 | $crypto, |
||
| 25 | $configuration, |
||
| 26 | new GuzzleSoapClientDriver( |
||
| 27 | new GuzzleClient( |
||
| 28 | [RequestOptions::VERIFY => CaBundle::getBundledCaBundlePath()] |
||
| 29 | ) |
||
| 30 | ) |
||
| 31 | ); |
||
| 32 | |||
| 33 | $receipt = new Receipt( |
||
| 34 | true, |
||
| 35 | 'CZ683555118', |
||
| 36 | '0/6460/ZQ42', |
||
| 37 | new DateTimeImmutable('2016-11-01 00:30:12'), |
||
| 38 | 3411300 |
||
| 39 | ); |
||
| 40 | |||
| 41 | $response = $client->send($receipt); |
||
| 42 | |||
| 43 | $this->assertInstanceOf(EvidenceResponse::class, $response); |
||
| 44 | $this->assertTrue($response->isValid()); |
||
| 45 | $this->assertNotNull($response->getFik()); |
||
| 46 | $this->assertNotNull($response->getUuid()); |
||
| 47 | $this->assertTrue($response->isTest()); |
||
| 48 | } |
||
| 49 | |||
| 51 |