diff --git a/cobertura.xml b/cobertura.xml index 61cc7b8..377d895 100644 --- a/cobertura.xml +++ b/cobertura.xml @@ -1,59 +1,59 @@ - + /home/thomas/projekte/calc/src - + - + - + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - + @@ -61,50 +61,50 @@ - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + + + + + + - - - + + + - + - + @@ -112,119 +112,119 @@ - + - + - + - - - - - + + + + + - + - - - - - - - - - - + + + + + + + + + + - + - - - - - - - - + + + + + + + + - + - - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -267,479 +267,479 @@ - + - + - + - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - - + + + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -747,27 +747,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -775,27 +775,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -803,27 +803,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -831,27 +831,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -859,27 +859,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -887,27 +887,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -915,27 +915,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -943,27 +943,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -971,27 +971,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -999,107 +999,107 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1107,27 +1107,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1135,27 +1135,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1163,27 +1163,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1191,27 +1191,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1219,27 +1219,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1247,27 +1247,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1275,27 +1275,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1303,27 +1303,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1331,27 +1331,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -1359,26 +1359,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -1437,496 +1437,496 @@ - + - + - + - - + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + - - - + + + - - - - - + + + + + - + - - - - + + + + - - - - - + + + + + - - + + - + - - - - + + + + - - - - - + + + + + - - + + - + - - - - - - - - - + + + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - + + + + + + + + + - - - - - + + + + + - - - - - - + + + + + + - - - - - + + + + + - - - - - - - - - - - + + + + + + + + + + + - + - - - - - - - + + + + + + + - + - + - + - - - + + + - + - + - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2035,19 +2035,19 @@ - + - + - + - - + + - + - + @@ -2057,71 +2057,71 @@ - - - + + + - + - + - + - - - - - - + + + + + + - + - - - - - - + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - + - + - - - - - - - - + + + + + + + + @@ -2130,10 +2130,10 @@ - + - - + + @@ -2141,146 +2141,146 @@ - + - - + + - + - + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - + + + - + - + - + - + - + - + @@ -2288,9 +2288,9 @@ - + - + @@ -2298,14 +2298,14 @@ - + - + - + - + @@ -2313,11 +2313,11 @@ - + - - - + + + @@ -2325,15 +2325,15 @@ - + - - - - - - - + + + + + + + @@ -2341,9 +2341,9 @@ - + - + @@ -2351,29 +2351,29 @@ - + - - - - - + + + + + - + - + - + - - + + - + - + @@ -2381,22 +2381,22 @@ - + - + - + - - - + + + - + - - + + @@ -2409,9 +2409,9 @@ - + - + @@ -2419,14 +2419,14 @@ - + - + - + - + @@ -2434,14 +2434,14 @@ - + - + - + - + @@ -2449,332 +2449,332 @@ - + - + - + - + - + - - - + + + - + - + - + - - - + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - + + + + + + - + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + - + - - + + - - - + + + - - - - - - - + + + + + + + - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + + + - + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2782,19 +2782,19 @@ - + - + - + - - + + @@ -2805,26 +2805,26 @@ - - + + - + - + - + - - + + @@ -2835,20 +2835,20 @@ - - + + - + - + - + - + @@ -2856,1092 +2856,1092 @@ - + - - - - + + + + - + - + - + - + - + - + - - - - - - + + + + + + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - - - - - - - + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + + + + + + + - + - + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - - - + + + - - + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - + + + + + + + + - + - - - - - - - - + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - - - + + + + - - - - + + + + - + - + - + - - + + - + - - - - - - - - - + + + + + + + + + - + - - - - + + + + - + - - - - - - - + + + + + + + - + - - - - - - - - + + + + + + + + - + - - - - - - - - + + + + + + + + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - - + + @@ -4186,8 +4186,8 @@ - - + + @@ -4438,54 +4438,54 @@ - + - + - + - - - + + + - + - + - + - + - + - + - + - - - - - - + + + + + + - + - + - + - - - - - + + + + + @@ -4538,24 +4538,24 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -4600,86 +4600,86 @@ - + - + - + - + - + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - + - - - - + + + + - + - - - - - - - - + + + + + + + + @@ -4689,137 +4689,137 @@ - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - + - + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - - - - - - - - - - - + + + + + + + + + + + + @@ -4827,53 +4827,53 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4903,18 +4903,18 @@ - + - + - + - + - + - + @@ -4928,23 +4928,23 @@ - + - - - - - + + + + + - + - - - - - - + + + + + + @@ -4953,14 +4953,14 @@ - + - + - + - + @@ -4973,9 +4973,9 @@ - + - + @@ -5066,40 +5066,40 @@ - + - + - - + + - - - - - - - - - - - + + + + + + + + + + + - - + + - + @@ -5140,31 +5140,31 @@ - + - + - + - + - - - - - + + + + + - - - - - + + + + + @@ -5172,16 +5172,16 @@ - + - + - + - - - - + + + + @@ -5194,134 +5194,134 @@ - + - - - - - - - - - - + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - - - - + + + + @@ -5334,171 +5334,195 @@ - + - + - + - + - + - - - - - - - - - - - - - - - + + + + + + + + + + + - + - + - - - + + + - + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + @@ -5513,108 +5537,108 @@ - - - - - - - + + + + + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + - - - + + + - - - + + + - - - - - - - + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + @@ -5631,28 +5655,28 @@ - + - - + + - - + + - + - - - - + + + + - + @@ -5663,28 +5687,28 @@ - - + + - - - - - - + + + + + + - + - + - + - + @@ -5692,9 +5716,9 @@ - + - + @@ -5708,22 +5732,22 @@ - + - - - - - - - + + + + + + + - + - + @@ -5731,217 +5755,217 @@ - - - - - - - + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - + + + + + + - - - - - - - - + + + + + - + - - + + + + + - - - - - - - - - - - - - - - + + - - - - - - - - + + + + + + + - - - - - - - + + + + + - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -5970,80 +5994,80 @@ - + - + - + - + - + - - + + - - + + - + - - - + + + - - - + + + - - - - - + + + + + - + - + - + - - + + - + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + @@ -6054,48 +6078,48 @@ - + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -6106,21 +6130,21 @@ - - + + - - - - - - + + + + + + - + @@ -6128,23 +6152,23 @@ - - - + + + - - - - - - - + + + + + + + - + @@ -6153,29 +6177,29 @@ - - + + - + - - - - - - - - + + + + + + + + - + @@ -6183,19 +6207,19 @@ - - - - - - - - - - + + + + + + + + + + - + @@ -6204,80 +6228,80 @@ - - + + - + - + - + - + - - - - - - - - + + + + + + + + - + - - + + - - + + - - + + - - - - - + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - - - - + + + + @@ -6288,25 +6312,25 @@ - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -6332,9 +6356,9 @@ - - - + + + @@ -6354,18 +6378,18 @@ - - - - - + + + + + - - - + + + @@ -6385,116 +6409,116 @@ - - - - - + + + + + - + - - - - + + + + - + - - - - + + + + - + - + - + - + - + - + - + - + - - - - - - - - - - + + + + + + + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + @@ -6512,9 +6536,9 @@ - - - + + + @@ -6534,14 +6558,14 @@ - - - - - - - - + + + + + + + + @@ -6561,34 +6585,34 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - + - + - + @@ -6607,25 +6631,25 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + - + @@ -6638,121 +6662,121 @@ - - - - - - - - - - - - + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + - + - + - + - + - - - - + + + + - - - - - + + + + + - + - + - + - + @@ -6765,110 +6789,110 @@ - + - - - - - - - - - - + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + + - + - + - + - + - + - - + + - - - + + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + @@ -6878,122 +6902,122 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -7001,29 +7025,29 @@ - + - + - + - + - + - + - + - + - + @@ -7036,189 +7060,189 @@ - + - - - - - - - + + + + + + + - + - - - + + + - + - - - - - - - - - - - + + + + + + + + + + + - + - - - + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - + + + + + + + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - - - + + + - + - + - + - - - + + + - + - + - + - - - - - - - - - + + + + + + + + + - + - + - + - + - + - + - + - + - + - - - - + + + + @@ -7235,27 +7259,27 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -7287,41 +7311,41 @@ - + - - - - - - + + + + + + - - - - + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -7348,124 +7372,124 @@ - + - + - + - + - + - + - + - - - - - - - - - + + + + + + + + + - + - - - - + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + - + - + - - - + + + - + - - - - - - - - + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - + - + - + - + - + - + - + - + @@ -7475,145 +7499,145 @@ - + - + - + - + - + - + - + - + - + - + - + - - - - - - + + + + + + - + - + - + - - - - - - - - + + + + + + + + - - - - + + + + - + - + - + - - + + - - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - + - + - - + + @@ -7638,143 +7662,143 @@ - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -7797,129 +7821,129 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7934,33 +7958,33 @@ - + - + - + - - - + + + - + - + - + - - + + - - - - + + + + @@ -7978,48 +8002,48 @@ - + - + - + - + - + - - - - + + + + - - - - - - + + + + + + - - - - + + + + - - - - - - + + + + + + @@ -8032,90 +8056,90 @@ - + - + - - + + - + - + - + - - - + + + - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - + + + @@ -8126,18 +8150,18 @@ - - + + - + - + @@ -8149,110 +8173,110 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + - - - + + + - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - + + + - + - + - - - + + + - + - + - + - + - + - - - - + + + + - + - - - + + + - + - - + + @@ -8272,12 +8296,12 @@ - + - + - + @@ -8285,153 +8309,153 @@ - + - + - + - + - + - - - + + + - + - - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8518,23 +8542,23 @@ - + - + - + - + - + - + - + - + @@ -8542,19 +8566,19 @@ - + - + - + - + - + - + @@ -8562,9 +8586,9 @@ - + - + @@ -8572,109 +8596,109 @@ - + - + - + - - - - - - - - - + + + + + + + + + - + - + - + - + - - - + + + - - - + + + - + - - - - - - - - - - - - + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -8682,114 +8706,114 @@ - + - - - - - - - - - + + + + + + + + + - + - - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - + - + - + - + - + - - + + @@ -8834,579 +8858,587 @@ - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - + - + - + - - - + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - + + + + + + + - + - + - + - + - + - - - - - - - - - - - + + + + + + + + + + + + + + - - - - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - + + + + + - + - + - + - + - + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + - + - + - + - + - + - - - - - + + + + + + - - - - - - + + + - + - + - + - + - + - - - - + + + + + + + + + + + - - - - - + + + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -9419,24 +9451,24 @@ - + - + - + - + - + - + - + - + @@ -9449,29 +9481,29 @@ - + - + - + - + - + - - - - + + + + - - + + diff --git a/src/Option/Parser.php b/src/Option/Parser.php index c64ef99..913ac5f 100644 --- a/src/Option/Parser.php +++ b/src/Option/Parser.php @@ -6,20 +6,24 @@ use PSC\Library\Calc\Option\Parser\Checkbox; use PSC\Library\Calc\Option\Parser\Headline; use PSC\Library\Calc\Option\Parser\Hidden; use PSC\Library\Calc\Option\Parser\Input; +use PSC\Library\Calc\Option\Parser\Media; use PSC\Library\Calc\Option\Parser\Radio; +use PSC\Library\Calc\Option\Parser\Row; +use PSC\Library\Calc\Option\Parser\Row\Column; use PSC\Library\Calc\Option\Parser\Select; use PSC\Library\Calc\Option\Parser\Template; use PSC\Library\Calc\Option\Parser\Text; -use PSC\Library\Calc\Option\Parser\Media; use PSC\Library\Calc\Option\Parser\Textarea; class Parser { - public function __construct() - { - } + public function __construct( + private $paperContainer, + private $paperRepository, + private $templates, + ) {} - public function getOptByJsonType(int $type, ?string $mode = null) + public function getOptByJsonType(int $type, null|string $mode = null) { $obj = false; switch ($type) { @@ -42,20 +46,26 @@ class Parser $obj = new Headline(); break; case 7: - $obj = new Checkbox(); + $obj = new Row($this->paperContainer, $this->paperRepository, $this->templates); break; case 8: - $obj = new Radio(); + $obj = new Column($this->paperContainer, $this->paperRepository, $this->templates); break; case 9: $obj = new Media(); break; + case 10: + $obj = new Checkbox(); + break; + case 11: + $obj = new Radio(); + break; } return $obj; } - public function getOptByType(string $type, ?string $mode = null) + public function getOptByType(string $type, null|string $mode = null) { $obj = false; switch (strtolower($type)) { @@ -86,12 +96,17 @@ class Parser case 'template': $obj = new Template(); break; + case 'row': + $obj = new Row($this->paperContainer, $this->paperRepository, $this->templates); + break; + case 'column': + $obj = new Column($this->paperContainer, $this->paperRepository, $this->templates); + break; case 'media': $obj = new Media(); break; } return $obj; - } } diff --git a/src/Parser.php b/src/Parser.php index 115ae0b..cf40e70 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -1,6 +1,6 @@ paperContainer, $this->paperRepository, $this->templates); - $this->article = new Article($json['name'], $json['uuid']?? null); - + $optionParser = new \PSC\Library\Calc\Option\Parser( + $this->paperContainer, + $this->paperRepository, + $this->templates, + ); + $this->article = new Article($json['name'], $json['uuid'] ?? null); + foreach ($json['options'] as $option) { - $obj = $optionParser->getOptByJsonType($option['type'], $option['mode']?? null); - if($obj) { + $obj = $optionParser->getOptByJsonType($option['type'], $option['mode'] ?? null); + if ($obj) { $obj->fromJson($option); - if($obj instanceof Select) { + if ($obj instanceof Select) { $obj->setPaperContainer($this->getPaperContainer()); $obj->setPaperRepository($this->getPaperRepository()); } - if($obj instanceof Template) { + if ($obj instanceof Template) { $element = $obj->parseJson(); $default = $element->getDefault(); $node = $this->templates->xpath('//option[@id="' . $element->getSelect() . '"]'); $obj = $optionParser->getOptByType($node[0]); $element = $obj->parseJson(); - if($default != "") { + if ($default != '') { $element->setDefault($default); } - }else{ + } else { $element = $obj->parseJson(); } $this->article->addOption($element); } } - return $this->article; - } + } public function parseXML(\SimpleXMLElement $node): Article { - $optionParser = new \PSC\Library\Calc\Option\Parser($this->paperContainer, $this->paperRepository, $this->templates); + $optionParser = new \PSC\Library\Calc\Option\Parser( + $this->paperContainer, + $this->paperRepository, + $this->templates, + ); - $this->article = new Article((string)$node->name, (string)$node->uuid?? null); - - if(isset($node->kommentar)) { - $this->article->setComment((string)$node->kommentar); + $this->article = new Article((string) $node->name, ((string) $node->uuid) ?? null); + + if (isset($node->kommentar)) { + $this->article->setComment((string) $node->kommentar); } - if(isset($node->precalc)) { - if(isset($node->precalc['type']) && isset($node->precalc['select']) && strtolower($node->precalc['type']) == 'template') { - $nodePreCalc = $this->templates->xpath('//precalc[@id="' . (string)$node->precalc['select'] . '"]'); - if(isset($nodePreCalc[0])) { + if (isset($node->precalc)) { + if ( + isset($node->precalc['type'], $node->precalc['select']) && + strtolower($node->precalc['type']) == 'template' + ) { + $nodePreCalc = $this->templates->xpath('//precalc[@id="' . ((string) $node->precalc['select']) . '"]'); + if (isset($nodePreCalc[0])) { $parser = new PreCalc($nodePreCalc[0]); $this->article->setPreCalc($parser->parse()); } - }else{ + } else { $parser = new PreCalc($node->precalc); $this->article->setPreCalc($parser->parse()); } } - if(isset($node->displaygroups)) { - - foreach($node->displaygroups->group as $group) { - $this->article->addDisplayGroup(new DisplayGroup((string)$group['id'], (string)$group['name'])); + if (isset($node->displaygroups)) { + foreach ($node->displaygroups->group as $group) { + $this->article->addDisplayGroup(new DisplayGroup((string) $group['id'], (string) $group['name'])); } } foreach ($node->children() as $key => $option) { - if($key == 'option') { - $obj = $optionParser->getOptByType($option['type'], $option['mode']?? null); - if($obj) { + if ($key == 'option') { + $obj = $optionParser->getOptByType($option['type'], $option['mode'] ?? null); + if ($obj) { $obj->fromXML($option); - if($obj instanceof Select) { + if ($obj instanceof Select) { $obj->setPaperContainer($this->getPaperContainer()); $obj->setPaperRepository($this->getPaperRepository()); } - if($obj instanceof Template) { + if ($obj instanceof Template) { $element = $obj->parseXML(); $default = $element->getDefault(); @@ -105,19 +112,14 @@ class Parser $obj = $optionParser->getOptByType($node[0]['type']); $obj->fromXML($node[0]); $element = $obj->parseXML(); - if($default != "") { + if ($default != '') { $element->setDefault($default); } - }else{ + } else { $element = $obj->parseXML(); } $this->article->addOption($element); } - }elseif($key == 'row') { - $obj = new Row($this->paperContainer, $this->paperRepository, $this->templates); - $obj->fromXML($option); - $element = $obj->parseXML(); - $this->article->addOption($element); } } @@ -160,5 +162,4 @@ class Parser { $this->templates = $templates; } - } diff --git a/tests/CMS/Type/Container/cms1.xml b/tests/CMS/Type/Container/cms1.xml index a58d3ac..431485b 100644 --- a/tests/CMS/Type/Container/cms1.xml +++ b/tests/CMS/Type/Container/cms1.xml @@ -2,8 +2,8 @@ - + @@ -62,7 +62,7 @@ - + diff --git a/tests/Json/ParserTest.php b/tests/Json/ParserTest.php new file mode 100644 index 0000000..14e6567 --- /dev/null +++ b/tests/Json/ParserTest.php @@ -0,0 +1,26 @@ +loadJson(file_get_contents(__DIR__ . '/fromRowCol.json'))); + self::assertXmlStringEqualsXmlFile(__DIR__ . '/fromRowCol.xml', $engine1->generateXML()); + } + + public function testFromXML() + { + $engine1 = new Engine(); + self::assertTrue($engine1->loadString(file_get_contents(__DIR__ . '/fromRowCol.xml'))); + self::assertJsonStringEqualsJsonFile(__DIR__ . '/fromRowCol.json', $engine1->generateJson()); + } +} diff --git a/tests/Json/fromRowCol.json b/tests/Json/fromRowCol.json new file mode 100644 index 0000000..21002f7 --- /dev/null +++ b/tests/Json/fromRowCol.json @@ -0,0 +1,64 @@ +[ + { + "uuid": "df2df718-b28e-482d-bf0c-67d246f05d32", + "name": "Test Artikel", + "options": [ + { + "id": "dee2007d-1ffe-430e-b75f-4f32a30b6a6d", + "type": 7, + "dependencys": [], + "columns": [ + { + "id": "1", + "dependencys": [], + "type": 8, + "options": [ + { + "id": "auflage", + "name": "Auflage", + "default": "100", + "dependencys": [], + "placeHolder": "Placeholder", + "required": false, + "type": 2 + }, + { + "id": "seiten_umschlag", + "name": "Seiten Umschlag", + "default": "2", + "dependencys": [], + "placeHolder": "Placeholder", + "required": false, + "type": 2 + } + ] + }, + { + "id": "2", + "type": 8, + "dependencys": [], + "options": [ + { + "id": "farbe1", + "name": "Farbe1", + "default": "142", + "container": "pantone+-solid-uncoated", + "mode": "colordb", + "dependencys": [], + "required": true, + "options": [ + { + "dependencys": [], + "id": "142", + "name": "142" + } + ], + "type": 3 + } + ] + } + ] + } + ] + } +] diff --git a/tests/Json/fromRowCol.xml b/tests/Json/fromRowCol.xml new file mode 100644 index 0000000..7100573 --- /dev/null +++ b/tests/Json/fromRowCol.xml @@ -0,0 +1,23 @@ + + + + Test Artikel + df2df718-b28e-482d-bf0c-67d246f05d32 + + + + + + + diff --git a/tests/Parse/Option/CheckboxTest.php b/tests/Parse/Option/CheckboxTest.php index 3e3f3e7..ccf081c 100644 --- a/tests/Parse/Option/CheckboxTest.php +++ b/tests/Parse/Option/CheckboxTest.php @@ -1,4 +1,5 @@ getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/checkbox.xml'))['type']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/checkbox.xml'))['type'], + ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/checkbox.xml'))); $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Checkbox', $element); } - } diff --git a/tests/Parse/Option/InputTest.php b/tests/Parse/Option/InputTest.php index ff1e29d..a6188ea 100644 --- a/tests/Parse/Option/InputTest.php +++ b/tests/Parse/Option/InputTest.php @@ -1,4 +1,5 @@ getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))['type']); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))['type'], + ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); $element = $obj->parseXML(); @@ -21,10 +24,12 @@ class InputTest extends TestCase public function testIfCorrectAttributes() { - $parser = new Parser(); + $parser = new Parser(null, null, null); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))['type']); - + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))['type'], + ); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/input.xml'))); $element = $obj->parseXML(); @@ -34,5 +39,4 @@ class InputTest extends TestCase $this->assertEquals('auflage', $element->getId()); $this->assertEquals('Auflage', $element->getName()); } - } diff --git a/tests/Parse/Option/RadioboxTest.php b/tests/Parse/Option/RadioboxTest.php index 02c02d5..fe87052 100644 --- a/tests/Parse/Option/RadioboxTest.php +++ b/tests/Parse/Option/RadioboxTest.php @@ -1,4 +1,5 @@ getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))['type']); - $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))['type']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))['type'], + ); + $obj->fromXML( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/radiobox.xml'))['type'], + ); $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Radio', $element); } - } diff --git a/tests/Parse/Option/SelectTest.php b/tests/Parse/Option/SelectTest.php index 6a52c51..b68df07 100644 --- a/tests/Parse/Option/SelectTest.php +++ b/tests/Parse/Option/SelectTest.php @@ -1,4 +1,5 @@ getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['mode']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['type'], + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['mode'], + ); $obj->setPaperContainer(new PaperContainer()); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); $element = $obj->parseXML(); @@ -23,8 +27,10 @@ class SelectTest extends TestCase public function testIfCorrectAttributes() { - $parser = new Parser(); - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['type']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))['type'], + ); $obj->setPaperContainer(new PaperContainer()); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/select.xml'))); $element = $obj->parseXML(); @@ -39,7 +45,8 @@ class SelectTest extends TestCase public function testIfPaperContainerReturnsCorrectItems() { $paperContainer = new PaperContainer(); - $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/papierContainer.xml'))); + $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/papierContainer.xml'))); $this->assertEquals(2, $paperContainer->getContainer()->count()); @@ -59,16 +66,22 @@ class SelectTest extends TestCase public function testIfSelectWithPaperContainerModeReturnsCorrectOpt() { - $repository = new PaperRepostory(); $paperContainer = new PaperContainer(); - $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/papierContainer.xml'))); + $paperContainer->parse(simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/papierContainer.xml'))); - $parser = new Parser(); + $parser = new Parser($paperContainer, $repository, null); /** @var Parser\Select $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))['mode']); - $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectPaperDB.xml'))); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectPaperDB.xml'))['type'], + simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectPaperDB.xml'))['mode'], + ); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectPaperDB.xml'))); $obj->setPaperContainer($paperContainer); $obj->setPaperRepository($repository); @@ -82,9 +95,15 @@ class SelectTest extends TestCase public function testIfSelectWithColorModePantoneReturnsCorrectOpt() { - $parser = new Parser(); - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))['mode']); - $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))['type'], + simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))['mode'], + ); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectColorDBPantone.xml'))); $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); @@ -93,14 +112,19 @@ class SelectTest extends TestCase public function testIfSelectWithColorModeReturnsCorrectOpt() { - $parser = new Parser(); - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))['type'], simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))['mode']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))['type'], + simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))['mode'], + ); - $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))); + $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . + '/../../TestFiles/Option/Select/selectColorDBHKS.xml'))); $element = $obj->parseXML(); $this->assertInstanceOf('PSC\Library\Calc\Option\Type\Select', $element); $this->assertEquals(86, $element->getOptions()->count()); } - } diff --git a/tests/Parse/Option/TextTest.php b/tests/Parse/Option/TextTest.php index b56685b..975b4d7 100644 --- a/tests/Parse/Option/TextTest.php +++ b/tests/Parse/Option/TextTest.php @@ -1,4 +1,5 @@ getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))['type']); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))['type'], + ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); /** @var Input $element */ $element = $obj->parseXML(); @@ -22,9 +25,11 @@ class TextTest extends TestCase public function testIfCorrectAttributes() { - $parser = new Parser(); + $parser = new Parser(null, null, null); /** @var Parser\Input $obj */ - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))['type']); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))['type'], + ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/text.xml'))); /** @var Input $element */ $element = $obj->parseXML(); @@ -34,5 +39,4 @@ class TextTest extends TestCase $this->assertEquals('t60', $element->getId()); $this->assertEquals('', $element->getName()); } - } diff --git a/tests/Parse/Option/TextareaTest.php b/tests/Parse/Option/TextareaTest.php index a448955..2996062 100644 --- a/tests/Parse/Option/TextareaTest.php +++ b/tests/Parse/Option/TextareaTest.php @@ -1,4 +1,5 @@ getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type'], + ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); $element = $obj->parseXML(); @@ -20,8 +23,10 @@ class TextareaTest extends TestCase public function testIfCorrectAttributes() { - $parser = new Parser(); - $obj = $parser->getOptByType(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type']); + $parser = new Parser(null, null, null); + $obj = $parser->getOptByType( + simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))['type'], + ); $obj->fromXML(simplexml_load_string(file_get_contents(__DIR__ . '/../../TestFiles/Option/textarea.xml'))); $element = $obj->parseXML(); @@ -30,5 +35,4 @@ class TextareaTest extends TestCase $this->assertEquals('t60', $element->getId()); $this->assertEquals('', $element->getName()); } - }