@@ -37,7 +37,7 @@ public function testAssertConstPath()
37
37
}
38
38
39
39
/**
40
- * Defines what kind of payee as pripmary .
40
+ * Tests if the primary receiver constant has the correct value .
41
41
*
42
42
* @const string
43
43
*/
@@ -47,7 +47,7 @@ public function testAssertConstReceiverTypePrimary()
47
47
}
48
48
49
49
/**
50
- * Defines what kind of payee as secundary .
50
+ * Tests if the secondary receiver constant has the correct value .
51
51
*
52
52
* @const string
53
53
*/
@@ -57,7 +57,7 @@ public function testAssertConstReceiverTypeSecpndary()
57
57
}
58
58
59
59
/**
60
- * Currency used in the application .
60
+ * Tests the currency in the order creation response .
61
61
*
62
62
* @const string
63
63
*/
@@ -75,19 +75,38 @@ public function testCreateOrder()
75
75
76
76
$ this ->assertEquals ($ this ->last_ord_id , $ order_created ->getOwnId ());
77
77
$ this ->assertEquals ('CREATED ' , $ order_created ->getStatus ());
78
+ $ this ->assertEquals (new \DateTime ('2016-02-19T12:24:55.849-02 ' ), $ order_created ->getCreatedAt ());
79
+ $ this ->assertEquals (new \DateTime ('2016-02-19T12:24:55.849-02 ' ), $ order_created ->getUpdatedAt ());
78
80
}
79
81
80
82
/**
81
- * Teste if created itens price is correct.
83
+ * Tests if created items price are correct.
82
84
*/
83
- public function testItens ()
85
+ public function testItems ()
84
86
{
85
87
$ order_created = $ this ->executeOrder ();
86
88
$ itens = $ order_created ->getItemIterator ()->getArrayCopy ();
87
89
$ this ->assertEquals (100000 , $ itens [0 ]->price );
88
90
$ this ->assertEquals (990 , $ itens [1 ]->price );
89
91
}
90
92
93
+ /**
94
+ * Test if created order shipping address is correct
95
+ */
96
+ public function testShippingAddress ()
97
+ {
98
+ $ order_created = $ this ->executeOrder ();
99
+
100
+ $ this ->assertEquals ('01234000 ' , $ order_created ->getShippingAddressZipCode ());
101
+ $ this ->assertEquals ('Avenida Faria Lima ' , $ order_created ->getShippingAddressStreet ());
102
+ $ this ->assertEquals ('2927 ' , $ order_created ->getShippingAddressStreetNumber ());
103
+ $ this ->assertEquals ('8 ' , $ order_created ->getShippingAddressComplement ());
104
+ $ this ->assertEquals ('Sao Paulo ' , $ order_created ->getShippingAddressCity ());
105
+ $ this ->assertEquals ('Itaim ' , $ order_created ->getShippingAddressDistrict ());
106
+ $ this ->assertEquals ('SP ' , $ order_created ->getShippingAddressState ());
107
+ $ this ->assertEquals ('BRA ' , $ order_created ->getShippingAddressCountry ());
108
+ }
109
+
91
110
/**
92
111
*MoipTest if the total is correct.
93
112
*/
0 commit comments