29
29
30
30
namespace FattureInCloud \Test \Model ;
31
31
32
+ use FattureInCloud \ObjectSerializer ;
32
33
use PHPUnit \Framework \TestCase ;
33
34
34
35
/**
42
43
*/
43
44
class GetTaxProfileResponseTest extends TestCase
44
45
{
46
+ public $ array = [];
47
+ public $ object ;
48
+
45
49
/**
46
50
* Setup before running any test case
47
51
*/
@@ -54,6 +58,45 @@ public static function setUpBeforeClass(): void
54
58
*/
55
59
public function setUp (): void
56
60
{
61
+ $ json = '{
62
+ "data": {
63
+ "company_type": "individual",
64
+ "company_subtype": "artigiani",
65
+ "profession": "test",
66
+ "regime": "forfettario_5",
67
+ "rivalsa_name": "",
68
+ "default_rivalsa": 0,
69
+ "cassa_name": "",
70
+ "default_cassa": 0,
71
+ "default_cassa_taxable": 100,
72
+ "cassa2_name": "",
73
+ "default_cassa2": 0,
74
+ "default_cassa2_taxable": 0,
75
+ "default_withholding_tax": 0,
76
+ "default_withholding_tax_taxable": 100,
77
+ "default_other_withholding_tax": 0,
78
+ "enasarco": false,
79
+ "enasarco_type": "null",
80
+ "contributions_percentage": 0,
81
+ "med": false,
82
+ "default_vat": {
83
+ "id": 66,
84
+ "value": 0,
85
+ "description": "Contribuenti forfettari",
86
+ "notes": "Operazione non soggetta a IVA ai sensi dell \'art. 1, commi 54-89, Legge n. 190\/2014 e succ. modifiche\/integrazioni",
87
+ "e_invoice": true,
88
+ "ei_type": "2.2",
89
+ "ei_description": "Non soggetta art. 1\/54-89 L. 190\/2014 e succ. modifiche\/integrazioni",
90
+ "editable": false,
91
+ "is_disabled": false,
92
+ "default": true
93
+ }
94
+ }
95
+ } ' ;
96
+
97
+ $ this ->array = json_decode ($ json , true );
98
+
99
+ $ this ->object = ObjectSerializer::deserialize ($ json , '\FattureInCloud\Model\GetTaxProfileResponse ' );
57
100
}
58
101
59
102
/**
@@ -75,16 +118,18 @@ public static function tearDownAfterClass(): void
75
118
*/
76
119
public function testGetTaxProfileResponse ()
77
120
{
78
- // TODO: implement
79
- self ::markTestIncomplete ('Not implemented ' );
121
+ foreach ($ this ->array as $ key => $ value ) {
122
+ Testcase::assertArrayHasKey ($ key , $ this ->object );
123
+ }
80
124
}
81
125
82
126
/**
83
127
* Test attribute "data"
84
128
*/
85
129
public function testPropertyData ()
86
130
{
87
- // TODO: implement
88
- self ::markTestIncomplete ('Not implemented ' );
131
+ foreach ($ this ->array ['data ' ] as $ key => $ value ) {
132
+ Testcase::assertArrayHasKey ($ key , $ this ->object ['data ' ]);
133
+ }
89
134
}
90
135
}
0 commit comments