Completed
Push — master ( 8816e5...80fd62 )
by Stephan
15s
created

EntityTest::testSalesEntryLineEntity()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 3
rs 10
cc 1
eloc 1
nc 1
nop 0
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 testBudgetEntity()
48
    {
49
        $this->performEntityTest(\Picqer\Financials\Exact\Budget::class);
50
    }
51
52
    public function testCashEntryEntity()
53
    {
54
        $this->performEntityTest(\Picqer\Financials\Exact\CashEntry::class);
55
    }
56
57
    public function testCashEntryLineEntity()
58
    {
59
        $this->performEntityTest(\Picqer\Financials\Exact\CashEntryLine::class);
60
    }
61
62
    public function testContactEntity()
63
    {
64
        $this->performEntityTest(\Picqer\Financials\Exact\Contact::class);
65
    }
66
67
    public function testCostcenterEntity()
68
    {
69
        $this->performEntityTest(\Picqer\Financials\Exact\Costcenter::class);
70
    }
71
72
    public function testCostunitEntity()
73
    {
74
        $this->performEntityTest(\Picqer\Financials\Exact\Costunit::class);
75
    }
76
77
    public function testDirectDebitMandateEntity()
78
    {
79
        $this->performEntityTest(\Picqer\Financials\Exact\DirectDebitMandate::class);
80
    }
81
82
    public function testDivisionEntity()
83
    {
84
        $this->performEntityTest(\Picqer\Financials\Exact\Division::class);
85
    }
86
87
    public function testSystemDivisionEntity()
88
    {
89
        $this->performEntityTest(\Picqer\Financials\Exact\SystemDivision::class);
90
    }
91
92
    public function testDocumentEntity()
93
    {
94
        $this->performEntityTest(\Picqer\Financials\Exact\Document::class);
95
    }
96
97
    public function testDocumentAttachmentEntity()
98
    {
99
        $this->performEntityTest(\Picqer\Financials\Exact\DocumentAttachment::class);
100
    }
101
102
    public function testGeneralJournalEntity()
103
    {
104
        $this->performEntityTest(\Picqer\Financials\Exact\GeneralJournalEntry::class);
105
    }
106
107
    public function testGeneralJournalEntryLineEntity()
108
    {
109
        $this->performEntityTest(\Picqer\Financials\Exact\GeneralJournalEntryLine::class);
110
    }
111
112
    public function testGLAccountEntity()
113
    {
114
        $this->performEntityTest(\Picqer\Financials\Exact\GLAccount::class);
115
    }
116
117
    public function testInvoiceSalesOrdersEntity()
118
    {
119
        $this->performEntityTest(\Picqer\Financials\Exact\InvoiceSalesOrder::class);
120
    }
121
122
    public function testItemEntity()
123
    {
124
        $this->performEntityTest(\Picqer\Financials\Exact\Item::class);
125
    }
126
127
    public function testItemGroupEntity()
128
    {
129
        $this->performEntityTest(\Picqer\Financials\Exact\ItemGroup::class);
130
    }
131
132
    public function testItemWarehouseEntity()
133
    {
134
        $this->performEntityTest(\Picqer\Financials\Exact\ItemWarehouse::class);
135
    }
136
137
    public function testJournalEntity()
138
    {
139
        $this->performEntityTest(\Picqer\Financials\Exact\Journal::class);
140
    }
141
142
    public function testLayoutEntity()
143
    {
144
        $this->performEntityTest(\Picqer\Financials\Exact\Layout::class);
145
    }
146
147
    public function testMailMessageEntity()
148
    {
149
        $this->performEntityTest(\Picqer\Financials\Exact\MailMessage::class);
150
    }
151
152
    public function testMailMessageAttachmentEntity()
153
    {
154
        $this->performEntityTest(\Picqer\Financials\Exact\MailMessageAttachment::class);
155
    }
156
157
    public function testMeEntity()
158
    {
159
        $this->performEntityTest(\Picqer\Financials\Exact\Me::class);
160
    }
161
162
    public function testPayablesListEntity()
163
    {
164
        $this->performEntityTest(\Picqer\Financials\Exact\PayablesList::class);
165
    }
166
167
    public function testPaymentConditionEntity()
168
    {
169
        $this->performEntityTest(\Picqer\Financials\Exact\PaymentCondition::class);
170
    }
171
172
    public function testPrintedSalesInvoiceEntity()
173
    {
174
        $this->performEntityTest(\Picqer\Financials\Exact\PrintedSalesInvoice::class);
175
    }
176
177
    public function testProfitLossOverviewEntity()
178
    {
179
        $this->performEntityTest(\Picqer\Financials\Exact\ProfitLossOverview::class);
180
    }
181
182
    public function testPurchaseEntryEntity()
183
    {
184
        $this->performEntityTest(\Picqer\Financials\Exact\PurchaseEntry::class);
185
    }
186
187
    public function testPurchaseEntryLineEntity()
188
    {
189
        $this->performEntityTest(\Picqer\Financials\Exact\PurchaseEntryLine::class);
190
    }
191
192
    public function testPurchaseOrderEntity()
193
    {
194
        $this->performEntityTest(\Picqer\Financials\Exact\PurchaseOrder::class);
195
    }
196
197
    public function testPurchaseOrderLineEntity()
198
    {
199
        $this->performEntityTest(\Picqer\Financials\Exact\PurchaseOrderLine::class);
200
    }
201
202
    public function testQuotationEntity()
203
    {
204
        $this->performEntityTest(\Picqer\Financials\Exact\Quotation::class);
205
    }
206
207
    public function testQuotationLineEntity()
208
    {
209
        $this->performEntityTest(\Picqer\Financials\Exact\QuotationLine::class);
210
    }
211
212
    public function testReceivableListEntity()
213
    {
214
        $this->performEntityTest(\Picqer\Financials\Exact\ReceivableList::class);
215
    }
216
217
    public function testReportingBalanceEntity()
218
    {
219
        $this->performEntityTest(\Picqer\Financials\Exact\ReportingBalance::class);
220
    }
221
222
    public function testSalesEntryEntity()
223
    {
224
        $this->performEntityTest(\Picqer\Financials\Exact\SalesEntry::class);
225
    }
226
227
    public function testSalesEntryLineEntity()
228
    {
229
        $this->performEntityTest(\Picqer\Financials\Exact\SalesEntryLine::class);
230
    }
231
232
    public function testSalesInvoiceEntity()
233
    {
234
        $this->performEntityTest(\Picqer\Financials\Exact\SalesInvoice::class);
235
    }
236
237
    public function testSalesInvoiceLineEntity()
238
    {
239
        $this->performEntityTest(\Picqer\Financials\Exact\SalesInvoiceLine::class);
240
    }
241
242
    public function testSalesItemPriceEntity()
243
    {
244
        $this->performEntityTest(\Picqer\Financials\Exact\SalesItemPrice::class);
245
    }
246
247
    public function testSalesOrderEntity()
248
    {
249
        $this->performEntityTest(\Picqer\Financials\Exact\SalesOrder::class);
250
    }
251
252
    public function testSalesOrderLineEntity()
253
    {
254
        $this->performEntityTest(\Picqer\Financials\Exact\SalesOrderLine::class);
255
    }
256
257
    public function testShippingMethodEntity()
258
    {
259
        $this->performEntityTest(\Picqer\Financials\Exact\ShippingMethod::class);
260
    }
261
262
    public function testStockPositionEntity()
263
    {
264
        $this->performEntityTest(\Picqer\Financials\Exact\StockPosition::class);
265
    }
266
267
    public function testSubscriptionEntity()
268
    {
269
        $this->performEntityTest(\Picqer\Financials\Exact\Subscription::class);
270
    }
271
272
    public function testSubscriptionLineEntity()
273
    {
274
        $this->performEntityTest(\Picqer\Financials\Exact\SubscriptionLine::class);
275
    }
276
277
    public function testSubscriptionTypeEntity()
278
    {
279
        $this->performEntityTest(\Picqer\Financials\Exact\SubscriptionType::class);
280
    }
281
282
    public function testTransactionEntity()
283
    {
284
        $this->performEntityTest(\Picqer\Financials\Exact\Transaction::class);
285
    }
286
287
    public function testTransactionLineEntity()
288
    {
289
        $this->performEntityTest(\Picqer\Financials\Exact\TransactionLine::class);
290
    }
291
292
    public function testUnitsEntity()
293
    {
294
        $this->performEntityTest(\Picqer\Financials\Exact\Units::class);
295
    }
296
297
    public function testVatcodeEntity()
298
    {
299
        $this->performEntityTest(\Picqer\Financials\Exact\VatCode::class);
300
    }
301
302
    public function testWebhookSubscriptionEntity()
303
    {
304
        $this->performEntityTest(\Picqer\Financials\Exact\WebhookSubscription::class);
305
    }
306
307
    public function testStockCountEntity()
308
    {
309
        $this->performEntityTest(\Picqer\Financials\Exact\StockCount::class);
310
    }
311
312
    public function testStockCountLineEntity()
313
    {
314
        $this->performEntityTest(\Picqer\Financials\Exact\StockCountLine::class);
315
    }
316
317
    public function testWarehouseEntity()
318
    {
319
        $this->performEntityTest(\Picqer\Financials\Exact\Warehouse::class);
320
    }
321
322
    public function testStorageLocationEntity()
323
    {
324
        $this->performEntityTest(\Picqer\Financials\Exact\StorageLocation::class);
325
    }
326
327
    public function testGoodsDeliveryEntity()
328
    {
329
        $this->performEntityTest(\Picqer\Financials\Exact\GoodsDelivery::class);
330
    }
331
332
    public function testGoodsDeliveryLineEntity()
333
    {
334
        $this->performEntityTest(\Picqer\Financials\Exact\GoodsDeliveryLine::class);
335
    }
336
337
    public function testSalesOrderIDEntity()
338
    {
339
        $this->performEntityTest(\Picqer\Financials\Exact\SalesOrderID::class);
340
    }
341
342
    protected function performEntityTest($entityName)
343
    {
344
        $reflectionClass = new ReflectionClass($entityName);
345
346
        $this->assertTrue($reflectionClass->isInstantiable());
347
        $this->assertTrue($reflectionClass->hasProperty('fillable'));
348
        $this->assertTrue($reflectionClass->hasProperty('url'));
349
        $this->assertEquals('Picqer\Financials\Exact', $reflectionClass->getNamespaceName());
350
        $this->assertEquals('Picqer\Financials\Exact\Model', $reflectionClass->getParentClass()->getName());
351
    }
352
353
}
354