|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use PHPUnit\Framework\TestCase; |
|
4
|
|
|
/** |
|
5
|
|
|
* Class EntityTest |
|
6
|
|
|
* |
|
7
|
|
|
* Tests all entities to ensure entities have no PHP parse errors and have |
|
8
|
|
|
* at least the properties we need to use the entity |
|
9
|
|
|
*/ |
|
10
|
|
|
class EntityTest extends TestCase |
|
11
|
|
|
{ |
|
12
|
|
|
|
|
13
|
|
|
public function testAccountEntity() |
|
14
|
|
|
{ |
|
15
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Account::class); |
|
16
|
|
|
} |
|
17
|
|
|
|
|
18
|
|
|
public function testAccountClassificationEntity() |
|
19
|
|
|
{ |
|
20
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\AccountClassification::class); |
|
21
|
|
|
} |
|
22
|
|
|
|
|
23
|
|
|
public function testAccountInvolvedAccountEntity() |
|
24
|
|
|
{ |
|
25
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\AccountInvolvedAccount::class); |
|
26
|
|
|
} |
|
27
|
|
|
|
|
28
|
|
|
public function testAccountItemEntity() |
|
29
|
|
|
{ |
|
30
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\AccountItem::class); |
|
31
|
|
|
} |
|
32
|
|
|
|
|
33
|
|
|
public function testAddressEntity() |
|
34
|
|
|
{ |
|
35
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Address::class); |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
public function testBankAccountEntity() |
|
39
|
|
|
{ |
|
40
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\BankAccount::class); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
public function testBankEntity() |
|
44
|
|
|
{ |
|
45
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Bank::class); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
public function testBankEntryEntity() |
|
49
|
|
|
{ |
|
50
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\BankEntry::class); |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
public function testBankEntryLineEntity() |
|
54
|
|
|
{ |
|
55
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\BankEntryLine::class); |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
public function testBudgetEntity() |
|
59
|
|
|
{ |
|
60
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Budget::class); |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
public function testCashEntryEntity() |
|
64
|
|
|
{ |
|
65
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\CashEntry::class); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function testCashEntryLineEntity() |
|
69
|
|
|
{ |
|
70
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\CashEntryLine::class); |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
public function testContactEntity() |
|
74
|
|
|
{ |
|
75
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Contact::class); |
|
76
|
|
|
} |
|
77
|
|
|
|
|
78
|
|
|
public function testCostcenterEntity() |
|
79
|
|
|
{ |
|
80
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Costcenter::class); |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
public function testCostunitEntity() |
|
84
|
|
|
{ |
|
85
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Costunit::class); |
|
86
|
|
|
} |
|
87
|
|
|
|
|
88
|
|
|
public function testDirectDebitMandateEntity() |
|
89
|
|
|
{ |
|
90
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\DirectDebitMandate::class); |
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
public function testDivisionEntity() |
|
94
|
|
|
{ |
|
95
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Division::class); |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
public function testSystemDivisionEntity() |
|
99
|
|
|
{ |
|
100
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SystemDivision::class); |
|
101
|
|
|
} |
|
102
|
|
|
|
|
103
|
|
|
public function testDocumentEntity() |
|
104
|
|
|
{ |
|
105
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Document::class); |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
public function testDocumentAttachmentEntity() |
|
109
|
|
|
{ |
|
110
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\DocumentAttachment::class); |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
public function testGeneralJournalEntity() |
|
114
|
|
|
{ |
|
115
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\GeneralJournalEntry::class); |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function testGeneralJournalEntryLineEntity() |
|
119
|
|
|
{ |
|
120
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\GeneralJournalEntryLine::class); |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
public function testGLAccountEntity() |
|
124
|
|
|
{ |
|
125
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\GLAccount::class); |
|
126
|
|
|
} |
|
127
|
|
|
|
|
128
|
|
|
public function testGLTransactionTypeEntity() |
|
129
|
|
|
{ |
|
130
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\GLTransactionType::class); |
|
131
|
|
|
} |
|
132
|
|
|
|
|
133
|
|
|
public function testInvoiceSalesOrdersEntity() |
|
134
|
|
|
{ |
|
135
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\InvoiceSalesOrder::class); |
|
136
|
|
|
} |
|
137
|
|
|
|
|
138
|
|
|
public function testItemEntity() |
|
139
|
|
|
{ |
|
140
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Item::class); |
|
141
|
|
|
} |
|
142
|
|
|
|
|
143
|
|
|
public function testItemGroupEntity() |
|
144
|
|
|
{ |
|
145
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\ItemGroup::class); |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
public function testItemWarehouseEntity() |
|
149
|
|
|
{ |
|
150
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\ItemWarehouse::class); |
|
151
|
|
|
} |
|
152
|
|
|
|
|
153
|
|
|
public function testJournalEntity() |
|
154
|
|
|
{ |
|
155
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Journal::class); |
|
156
|
|
|
} |
|
157
|
|
|
|
|
158
|
|
|
public function testLayoutEntity() |
|
159
|
|
|
{ |
|
160
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Layout::class); |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
public function testMailMessageEntity() |
|
164
|
|
|
{ |
|
165
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\MailMessage::class); |
|
166
|
|
|
} |
|
167
|
|
|
|
|
168
|
|
|
public function testMailMessageAttachmentEntity() |
|
169
|
|
|
{ |
|
170
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\MailMessageAttachment::class); |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
public function testMeEntity() |
|
174
|
|
|
{ |
|
175
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Me::class); |
|
176
|
|
|
} |
|
177
|
|
|
|
|
178
|
|
|
public function testOutstandingInvoicesOverviewEntity() |
|
179
|
|
|
{ |
|
180
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\OutstandingInvoicesOverview::class); |
|
181
|
|
|
} |
|
182
|
|
|
|
|
183
|
|
|
public function testPayablesListEntity() |
|
184
|
|
|
{ |
|
185
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PayablesList::class); |
|
186
|
|
|
} |
|
187
|
|
|
|
|
188
|
|
|
public function testPaymentConditionEntity() |
|
189
|
|
|
{ |
|
190
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PaymentCondition::class); |
|
191
|
|
|
} |
|
192
|
|
|
|
|
193
|
|
|
public function testPrintedSalesInvoiceEntity() |
|
194
|
|
|
{ |
|
195
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PrintedSalesInvoice::class); |
|
196
|
|
|
} |
|
197
|
|
|
|
|
198
|
|
|
public function testProfitLossOverviewEntity() |
|
199
|
|
|
{ |
|
200
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\ProfitLossOverview::class); |
|
201
|
|
|
} |
|
202
|
|
|
|
|
203
|
|
|
public function testPurchaseEntryEntity() |
|
204
|
|
|
{ |
|
205
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PurchaseEntry::class); |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
public function testPurchaseEntryLineEntity() |
|
209
|
|
|
{ |
|
210
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PurchaseEntryLine::class); |
|
211
|
|
|
} |
|
212
|
|
|
|
|
213
|
|
|
public function testPurchaseOrderEntity() |
|
214
|
|
|
{ |
|
215
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PurchaseOrder::class); |
|
216
|
|
|
} |
|
217
|
|
|
|
|
218
|
|
|
public function testPurchaseOrderLineEntity() |
|
219
|
|
|
{ |
|
220
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\PurchaseOrderLine::class); |
|
221
|
|
|
} |
|
222
|
|
|
|
|
223
|
|
|
public function testQuotationEntity() |
|
224
|
|
|
{ |
|
225
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Quotation::class); |
|
226
|
|
|
} |
|
227
|
|
|
|
|
228
|
|
|
public function testQuotationLineEntity() |
|
229
|
|
|
{ |
|
230
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\QuotationLine::class); |
|
231
|
|
|
} |
|
232
|
|
|
|
|
233
|
|
|
public function testReceivableListEntity() |
|
234
|
|
|
{ |
|
235
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\ReceivableList::class); |
|
236
|
|
|
} |
|
237
|
|
|
|
|
238
|
|
|
public function testReportingBalanceEntity() |
|
239
|
|
|
{ |
|
240
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\ReportingBalance::class); |
|
241
|
|
|
} |
|
242
|
|
|
|
|
243
|
|
|
public function testSalesEntryEntity() |
|
244
|
|
|
{ |
|
245
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesEntry::class); |
|
246
|
|
|
} |
|
247
|
|
|
|
|
248
|
|
|
public function testSalesEntryLineEntity() |
|
249
|
|
|
{ |
|
250
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesEntryLine::class); |
|
251
|
|
|
} |
|
252
|
|
|
|
|
253
|
|
|
public function testSalesInvoiceEntity() |
|
254
|
|
|
{ |
|
255
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesInvoice::class); |
|
256
|
|
|
} |
|
257
|
|
|
|
|
258
|
|
|
public function testSalesInvoiceLineEntity() |
|
259
|
|
|
{ |
|
260
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesInvoiceLine::class); |
|
261
|
|
|
} |
|
262
|
|
|
|
|
263
|
|
|
public function testSalesItemPriceEntity() |
|
264
|
|
|
{ |
|
265
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesItemPrice::class); |
|
266
|
|
|
} |
|
267
|
|
|
|
|
268
|
|
|
public function testSalesOrderEntity() |
|
269
|
|
|
{ |
|
270
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesOrder::class); |
|
271
|
|
|
} |
|
272
|
|
|
|
|
273
|
|
|
public function testSalesOrderLineEntity() |
|
274
|
|
|
{ |
|
275
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesOrderLine::class); |
|
276
|
|
|
} |
|
277
|
|
|
|
|
278
|
|
|
public function testStockPositionEntity() |
|
279
|
|
|
{ |
|
280
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\StockPosition::class); |
|
281
|
|
|
} |
|
282
|
|
|
|
|
283
|
|
|
public function testSubscriptionEntity() |
|
284
|
|
|
{ |
|
285
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Subscription::class); |
|
286
|
|
|
} |
|
287
|
|
|
|
|
288
|
|
|
public function testSubscriptionLineEntity() |
|
289
|
|
|
{ |
|
290
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SubscriptionLine::class); |
|
291
|
|
|
} |
|
292
|
|
|
|
|
293
|
|
|
public function testSubscriptionTypeEntity() |
|
294
|
|
|
{ |
|
295
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SubscriptionType::class); |
|
296
|
|
|
} |
|
297
|
|
|
|
|
298
|
|
|
public function testTransactionEntity() |
|
299
|
|
|
{ |
|
300
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Transaction::class); |
|
301
|
|
|
} |
|
302
|
|
|
|
|
303
|
|
|
public function testTransactionLineEntity() |
|
304
|
|
|
{ |
|
305
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\TransactionLine::class); |
|
306
|
|
|
} |
|
307
|
|
|
|
|
308
|
|
|
public function testUnitsEntity() |
|
309
|
|
|
{ |
|
310
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Units::class); |
|
311
|
|
|
} |
|
312
|
|
|
|
|
313
|
|
|
public function testVatcodeEntity() |
|
314
|
|
|
{ |
|
315
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\VatCode::class); |
|
316
|
|
|
} |
|
317
|
|
|
|
|
318
|
|
|
public function testWebhookSubscriptionEntity() |
|
319
|
|
|
{ |
|
320
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\WebhookSubscription::class); |
|
321
|
|
|
} |
|
322
|
|
|
|
|
323
|
|
|
public function testStockCountEntity() |
|
324
|
|
|
{ |
|
325
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\StockCount::class); |
|
326
|
|
|
} |
|
327
|
|
|
|
|
328
|
|
|
public function testStockCountLineEntity() |
|
329
|
|
|
{ |
|
330
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\StockCountLine::class); |
|
331
|
|
|
} |
|
332
|
|
|
|
|
333
|
|
|
public function testWarehouseEntity() |
|
334
|
|
|
{ |
|
335
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\Warehouse::class); |
|
336
|
|
|
} |
|
337
|
|
|
|
|
338
|
|
|
public function testStorageLocationEntity() |
|
339
|
|
|
{ |
|
340
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\StorageLocation::class); |
|
341
|
|
|
} |
|
342
|
|
|
|
|
343
|
|
|
public function testGoodsDeliveryEntity() |
|
344
|
|
|
{ |
|
345
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\GoodsDelivery::class); |
|
346
|
|
|
} |
|
347
|
|
|
|
|
348
|
|
|
public function testGoodsDeliveryLineEntity() |
|
349
|
|
|
{ |
|
350
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\GoodsDeliveryLine::class); |
|
351
|
|
|
} |
|
352
|
|
|
|
|
353
|
|
|
public function testSalesOrderIDEntity() |
|
354
|
|
|
{ |
|
355
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesOrderID::class); |
|
356
|
|
|
} |
|
357
|
|
|
|
|
358
|
|
|
public function testItemWarehousePlanningDetails() |
|
359
|
|
|
{ |
|
360
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\ItemWarehousePlanningDetails::class); |
|
361
|
|
|
} |
|
362
|
|
|
|
|
363
|
|
|
public function testSalesShippingMethods() |
|
364
|
|
|
{ |
|
365
|
|
|
$this->performEntityTest(\Picqer\Financials\Exact\SalesShippingMethods::class); |
|
366
|
|
|
} |
|
367
|
|
|
|
|
368
|
|
|
protected function performEntityTest($entityName) |
|
369
|
|
|
{ |
|
370
|
|
|
$reflectionClass = new ReflectionClass($entityName); |
|
371
|
|
|
|
|
372
|
|
|
$this->assertTrue($reflectionClass->isInstantiable()); |
|
373
|
|
|
$this->assertTrue($reflectionClass->hasProperty('fillable')); |
|
374
|
|
|
$this->assertTrue($reflectionClass->hasProperty('url')); |
|
375
|
|
|
$this->assertEquals('Picqer\Financials\Exact', $reflectionClass->getNamespaceName()); |
|
376
|
|
|
$this->assertEquals('Picqer\Financials\Exact\Model', $reflectionClass->getParentClass()->getName()); |
|
377
|
|
|
} |
|
378
|
|
|
|
|
379
|
|
|
} |
|
380
|
|
|
|