Total Complexity | 3 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | class OrderTest extends SapphireTest |
||
17 | { |
||
18 | /** |
||
19 | * @var string[] |
||
20 | */ |
||
21 | protected static $fixture_file = [ |
||
22 | '../orders.yml', |
||
23 | '../orderhistory.yml', |
||
24 | '../customers.yml', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var string[] |
||
29 | */ |
||
30 | protected static $extra_dataobjects = [ |
||
31 | TestProduct::class, |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @var \string[][] |
||
36 | */ |
||
37 | protected static $required_extensions = [ |
||
38 | Variation::class => [ |
||
39 | TestVariationDataExtension::class, |
||
40 | ], |
||
41 | TestProduct::class => [ |
||
42 | Purchasable::class, |
||
43 | ], |
||
44 | ]; |
||
45 | |||
46 | /** |
||
47 | * |
||
48 | */ |
||
49 | public function testGetCMSFields() |
||
50 | { |
||
51 | $order = $this->objFromFixture(Order::class, 'one'); |
||
52 | $this->assertNull($order->getCMSFields()->dataFieldByName('Response')); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * |
||
57 | */ |
||
58 | public function testReceiptLink() |
||
59 | { |
||
60 | /** @var Order $order */ |
||
61 | $order = $this->objFromFixture(Order::class, 'one'); |
||
62 | |||
63 | $this->assertContains( |
||
64 | 'target="_blank" class="cms-panel-link action external-link">view</a>', |
||
65 | $order->ReceiptLink() |
||
66 | ); |
||
67 | } |
||
68 | |||
69 | /** |
||
70 | * |
||
71 | */ |
||
72 | public function testGetReceiptLink() |
||
80 | ); |
||
81 | } |
||
82 | } |
||
83 |