1515
1616class OrderTest extends TestCase
1717{
18- public function testCurrencyProperty (): void
18+ public function test_currency_property (): void
1919 {
2020 $ order = $ this ->createOrder ();
2121 $ order ->createMeta ('_order_currency ' , 'USD ' );
2222
2323 $ this ->assertSame ('USD ' , $ order ->currency );
2424 }
2525
26- public function testTotalProperty (): void
26+ public function test_total_property (): void
2727 {
2828 $ order = $ this ->createOrder ();
2929 $ order ->createMeta ('_order_total ' , '9.99 ' );
3030
3131 $ this ->assertSame ('9.99 ' , $ order ->total );
3232 }
3333
34- public function testShippingProperty (): void
34+ public function test_shipping_property (): void
3535 {
3636 $ order = $ this ->createOrder ();
3737 $ order ->createMeta ('_order_shipping ' , '8.88 ' );
3838
3939 $ this ->assertSame ('8.88 ' , $ order ->shipping );
4040 }
4141
42- public function testTaxProperty (): void
42+ public function test_tax_property (): void
4343 {
4444 $ order = $ this ->createOrder ();
4545 $ order ->createMeta ('_order_tax ' , '7.77 ' );
4646
4747 $ this ->assertSame ('7.77 ' , $ order ->tax );
4848 }
4949
50- public function testShippingTaxProperty (): void
50+ public function test_shipping_tax_property (): void
5151 {
5252 $ order = $ this ->createOrder ();
5353 $ order ->createMeta ('_order_shipping_tax ' , '6.66 ' );
5454
5555 $ this ->assertSame ('6.66 ' , $ order ->shipping_tax );
5656 }
5757
58- public function testStatusProperty (): void
58+ public function test_status_property (): void
5959 {
6060 $ order = $ this ->createOrder ([
6161 'post_status ' => 'wc-refunded ' ,
@@ -64,7 +64,7 @@ public function testStatusProperty(): void
6464 $ this ->assertSame ('refunded ' , $ order ->status );
6565 }
6666
67- public function testDateCompletedProperty (): void
67+ public function test_date_completed_property (): void
6868 {
6969 $ order = $ this ->createOrder ();
7070 $ order ->createMeta ('_date_completed ' , 1577836800 ); // '2020-01-01 00:00:00'
@@ -73,7 +73,7 @@ public function testDateCompletedProperty(): void
7373 $ this ->assertSame ('2020-01-01 00:00:00 ' , $ order ->date_completed ->format ('Y-m-d H:i:s ' ));
7474 }
7575
76- public function testDatePaidProperty (): void
76+ public function test_date_paid_property (): void
7777 {
7878 $ order = $ this ->createOrder ();
7979 $ order ->createMeta ('_date_paid ' , 1577840400 ); // '2020-01-01 01:00:00'
@@ -82,7 +82,7 @@ public function testDatePaidProperty(): void
8282 $ this ->assertSame ('2020-01-01 01:00:00 ' , $ order ->date_paid ->format ('Y-m-d H:i:s ' ));
8383 }
8484
85- public function testDeprecatedDateFormats (): void
85+ public function test_deprecated_date_formats (): void
8686 {
8787 $ order = $ this ->createOrder ();
8888 $ order ->createMeta ('_completed_date ' , '2020-01-01 00:00:00 ' );
@@ -95,28 +95,28 @@ public function testDeprecatedDateFormats(): void
9595 $ this ->assertSame ('2020-01-01 01:00:00 ' , $ order ->date_paid ->format ('Y-m-d H:i:s ' ));
9696 }
9797
98- public function testPaymentProperty (): void
98+ public function test_payment_property (): void
9999 {
100100 $ order = $ this ->createOrder ();
101101
102102 $ this ->assertInstanceOf (Payment::class, $ order ->payment );
103103 }
104104
105- public function testBillingAddressProperty (): void
105+ public function test_billing_address_property (): void
106106 {
107107 $ order = $ this ->createOrder ();
108108
109109 $ this ->assertInstanceOf (BillingAddress::class, $ order ->billing_address );
110110 }
111111
112- public function testShippingAddressProperty (): void
112+ public function test_shipping_address_property (): void
113113 {
114114 $ order = $ this ->createOrder ();
115115
116116 $ this ->assertInstanceOf (ShippingAddress::class, $ order ->shipping_address );
117117 }
118118
119- public function testArrayHasAppendedValues (): void
119+ public function test_array_has_appended_values (): void
120120 {
121121 /** @var Order */
122122 $ order = Order::factory ()->create ();
@@ -135,7 +135,7 @@ public function testArrayHasAppendedValues(): void
135135 $ this ->assertArrayHasKey ('shipping_address ' , $ array );
136136 }
137137
138- public function testRelatedCustomer (): void
138+ public function test_related_customer (): void
139139 {
140140 /** @var Customer */
141141 $ customer = Customer::factory ()->create ();
@@ -149,14 +149,14 @@ public function testRelatedCustomer(): void
149149 $ this ->assertTrue ($ orderCustomer ->is ($ customer ));
150150 }
151151
152- public function testGuestOrder (): void
152+ public function test_guest_order (): void
153153 {
154154 $ order = $ this ->createOrder ();
155155
156156 $ this ->assertNull ($ order ->customer );
157157 }
158158
159- public function testRelatedItems (): void
159+ public function test_related_items (): void
160160 {
161161 $ order = $ this ->createOrder ();
162162
@@ -166,7 +166,7 @@ public function testRelatedItems(): void
166166 }
167167
168168 /**
169- * @param mixed[] $attributes
169+ * @param array<string, mixed> $attributes
170170 */
171171 private function createOrder (array $ attributes = []): Order
172172 {
0 commit comments