|
2 | 2 |
|
3 | 3 | namespace MediGeek; |
4 | 4 |
|
5 | | -//require 'bootstrap.php'; |
6 | | - |
7 | | -use PHPUnit\Framework\TestCase; |
8 | 5 | use MediGeek\IPSQRCodeParser; |
9 | | - |
10 | | -/* |
11 | | - * The MIT License |
12 | | - * |
13 | | - * Copyright 2020 Savvas Radevic. |
14 | | - * |
15 | | - * Permission is hereby granted, free of charge, to any person obtaining a copy |
16 | | - * of this software and associated documentation files (the "Software"), to deal |
17 | | - * in the Software without restriction, including without limitation the rights |
18 | | - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
19 | | - * copies of the Software, and to permit persons to whom the Software is |
20 | | - * furnished to do so, subject to the following conditions: |
21 | | - * |
22 | | - * The above copyright notice and this permission notice shall be included in |
23 | | - * all copies or substantial portions of the Software. |
24 | | - * |
25 | | - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
26 | | - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
27 | | - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
28 | | - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
29 | | - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
30 | | - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
31 | | - * THE SOFTWARE. |
32 | | - */ |
| 6 | +use PHPUnit\Framework\TestCase; |
33 | 7 |
|
34 | 8 | /** |
35 | | - * IPSQRCodeTest |
36 | | - * |
37 | | - * @author Savvas Radevic |
| 9 | + * Generated by PHPUnit_SkeletonGenerator on 2020-07-12 at 19:45:29. |
38 | 10 | */ |
39 | | -class IPSQRCodeParserTest extends TestCase { |
40 | | - |
41 | | - public function testIPSQRCodeParser(): void { |
42 | | - $c = new IPSQRCodeParser("K:PR|V:01|C:1|R:160000000003465595|N:JKP INFOSTAN TEHNOLOGIJE BEOGRAD|I:RSD9999,99|SF:122|S:OBJEDINJENA NAPLATA|RO:11800515599052-20060-1"); |
43 | | - |
44 | | - $this->assertEquals( |
45 | | - |
46 | | - array( |
47 | | - "K" => "PR", |
48 | | - "V" => "01", |
49 | | - "C" => "1", |
50 | | - "R" => "160000000003465595", |
51 | | - "N" =>"JKP INFOSTAN TEHNOLOGIJE BEOGRAD", |
52 | | - "I" => "RSD9999,99", |
53 | | - "SF" => "122", |
54 | | - "S" => "OBJEDINJENA NAPLATA", |
55 | | - "RO"=> "11800515599052-20060-1", |
56 | | - ), |
57 | | - |
58 | | - $c->parseSplit() |
| 11 | +class IPSQRCodeParserTest extends TestCase |
| 12 | +{ |
| 13 | + |
| 14 | + /** |
| 15 | + * @var IPSQRCodeParser |
| 16 | + */ |
| 17 | + protected $object; |
| 18 | + |
| 19 | + /** |
| 20 | + * Sets up the fixture, for example, opens a network connection. |
| 21 | + * This method is called before a test is executed. |
| 22 | + */ |
| 23 | + protected function setUp(): void |
| 24 | + { |
| 25 | + $this->object = new IPSQRCodeParser("K:PR|V:01|C:1|R:160000000003465595" |
| 26 | + . "|N:JKP INFOSTAN TEHNOLOGIJE BEOGRAD|I:RSD9999,99|SF:122|S:OBJEDIN" |
| 27 | + . "JENA NAPLATA|RO:11800515599052-20060-1"); |
| 28 | + } |
| 29 | + |
| 30 | + /** |
| 31 | + * Tears down the fixture, for example, closes a network connection. |
| 32 | + * This method is called after a test is executed. |
| 33 | + */ |
| 34 | + protected function tearDown(): void |
| 35 | + { |
| 36 | + $this->object = new IPSQRCodeParser("K:PR|V:01|C:1|R:160000000000060216|N:Telekom Srbija A.D. |
| 37 | +Takovska 2 |
| 38 | +Beograd|I:RSD999,99|P:SAVVAS RADEVIĆ |
| 39 | +IMEULICE 01 |
| 40 | +11000 BEOGRAD 6|SF:189|S:MTS Račun 01/2020 12345566/2|RO:97082240113797893"); |
| 41 | + } |
| 42 | + |
| 43 | + /** |
| 44 | + * @covers MediGeek\IPSQRCodeParser::mapKeys |
| 45 | + * @todo Implement testMapKeys(). |
| 46 | + */ |
| 47 | + public function testMapKeys() |
| 48 | + { |
| 49 | + // Remove the following lines when you implement this test. |
| 50 | + $this->markTestIncomplete( |
| 51 | + 'This test has not been implemented yet.' |
| 52 | + ); |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * @covers MediGeek\IPSQRCodeParser::validate |
| 57 | + * @todo Implement testValidate(). |
| 58 | + */ |
| 59 | + public function testValidate() |
| 60 | + { |
| 61 | + // Remove the following lines when you implement this test. |
| 62 | + $this->markTestIncomplete( |
| 63 | + 'This test has not been implemented yet.' |
59 | 64 | ); |
60 | 65 | } |
61 | 66 |
|
| 67 | + /** |
| 68 | + * @covers MediGeek\IPSQRCodeParser::setQRCodeObjectVar |
| 69 | + * @todo Implement testSetQRCodeObjectVar(). |
| 70 | + */ |
| 71 | + public function testSetQRCodeObjectVar() |
| 72 | + { |
| 73 | + // Remove the following lines when you implement this test. |
| 74 | + $this->markTestIncomplete( |
| 75 | + 'This test has not been implemented yet.' |
| 76 | + ); |
| 77 | + } |
| 78 | + |
| 79 | + /** |
| 80 | + * @covers MediGeek\IPSQRCodeParser::get |
| 81 | + * @todo Implement testGet(). |
| 82 | + */ |
| 83 | + public function testGet() |
| 84 | + { |
| 85 | + // Remove the following lines when you implement this test. |
| 86 | + $this->markTestIncomplete( |
| 87 | + 'This test has not been implemented yet.' |
| 88 | + ); |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * @covers MediGeek\IPSQRCodeParser::parse |
| 93 | + * @todo Implement testParse(). |
| 94 | + */ |
| 95 | + public function testParse() |
| 96 | + { |
| 97 | + // Remove the following lines when you implement this test. |
| 98 | + $this->markTestIncomplete( |
| 99 | + 'This test has not been implemented yet.' |
| 100 | + ); |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * @covers MediGeek\IPSQRCodeParser::parseSplit |
| 105 | + * @todo Implement testParseSplit(). |
| 106 | + */ |
| 107 | + public function testParseSplit() |
| 108 | + { |
| 109 | + // Remove the following lines when you implement this test. |
| 110 | + $this->markTestIncomplete( |
| 111 | + 'This test has not been implemented yet.' |
| 112 | + ); |
| 113 | + } |
| 114 | + |
| 115 | + /** |
| 116 | + * @covers MediGeek\IPSQRCodeParser::parseCurrencyAndAmount |
| 117 | + * @todo Implement testParseCurrencyAndAmount(). |
| 118 | + */ |
| 119 | + public function testParseCurrencyAndAmount() |
| 120 | + { |
| 121 | + // Remove the following lines when you implement this test. |
| 122 | + $this->markTestIncomplete( |
| 123 | + 'This test has not been implemented yet.' |
| 124 | + ); |
| 125 | + } |
62 | 126 | } |
0 commit comments