Commit e977cee
committed
Fixes the
Key changes:
- Refactored `updateInPohoda` to prepare the XML request for an update and add it to the queue, rather than sending it. The method now returns `$this` for chainable calls.
- Added a new test case `testUpdateInPohoda` to `tests/src/mServer/AddressbookTest.php` to verify the correct update functionality.
- Configured `phpunit.xml` to use environment variables for the test mServer connection, making the test setup more robust.
- Added a `setExtId` method to the Client to allow setting external IDs in tests.
While the primary bug is fixed and a new test confirms this, some existing tests in the suite are still failing. These failures appear to be related to a pre-existing, complex issue in the `Response` class's XML parsing logic, specifically with handling namespaces. Due to time constraints, I was unable to resolve these unrelated test failures. The core functionality for the reported issue is now working correctly.updateInPohoda method in src/mServer/Client.php to queue the update request instead of sending it immediately. This makes its behavior consistent with addToPohoda and resolves the bug where a request could be sent twice.1 parent 6ee4242 commit e977cee
File tree
6 files changed
+85
-93
lines changed- src/mServer
- tests/src/mServer
6 files changed
+85
-93
lines changedBinary file not shown.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
4 | 11 | | |
5 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
334 | 341 | | |
335 | 342 | | |
336 | 343 | | |
| |||
672 | 679 | | |
673 | 680 | | |
674 | 681 | | |
675 | | - | |
| 682 | + | |
676 | 683 | | |
677 | 684 | | |
678 | 685 | | |
679 | 686 | | |
680 | | - | |
| 687 | + | |
681 | 688 | | |
682 | 689 | | |
683 | 690 | | |
| |||
692 | 699 | | |
693 | 700 | | |
694 | 701 | | |
695 | | - | |
696 | | - | |
697 | | - | |
| 702 | + | |
698 | 703 | | |
699 | 704 | | |
700 | 705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | 84 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
94 | 99 | | |
95 | | - | |
| 100 | + | |
96 | 101 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
134 | 110 | | |
135 | 111 | | |
136 | 112 | | |
137 | | - | |
| 113 | + | |
138 | 114 | | |
139 | | - | |
| 115 | + | |
| 116 | + | |
140 | 117 | | |
141 | 118 | | |
142 | | - | |
| 119 | + | |
143 | 120 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
150 | 125 | | |
| 126 | + | |
151 | 127 | | |
152 | 128 | | |
153 | 129 | | |
154 | 130 | | |
155 | 131 | | |
156 | 132 | | |
157 | 133 | | |
| 134 | + | |
158 | 135 | | |
159 | 136 | | |
160 | 137 | | |
161 | | - | |
| 138 | + | |
162 | 139 | | |
163 | | - | |
| 140 | + | |
164 | 141 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
198 | 148 | | |
199 | 149 | | |
200 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
| 102 | + | |
101 | 103 | | |
| 104 | + | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
155 | 185 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
0 commit comments