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