@@ -37,7 +37,7 @@ public function testAssertConstPath()
3737 }
3838
3939 /**
40- * Defines what kind of payee as pripmary .
40+ * Tests if the primary receiver constant has the correct value .
4141 *
4242 * @const string
4343 */
@@ -47,7 +47,7 @@ public function testAssertConstReceiverTypePrimary()
4747 }
4848
4949 /**
50- * Defines what kind of payee as secundary .
50+ * Tests if the secondary receiver constant has the correct value .
5151 *
5252 * @const string
5353 */
@@ -57,7 +57,7 @@ public function testAssertConstReceiverTypeSecpndary()
5757 }
5858
5959 /**
60- * Currency used in the application .
60+ * Tests the currency in the order creation response .
6161 *
6262 * @const string
6363 */
@@ -75,19 +75,38 @@ public function testCreateOrder()
7575
7676 $ this ->assertEquals ($ this ->last_ord_id , $ order_created ->getOwnId ());
7777 $ 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 ());
7880 }
7981
8082 /**
81- * Teste if created itens price is correct.
83+ * Tests if created items price are correct.
8284 */
83- public function testItens ()
85+ public function testItems ()
8486 {
8587 $ order_created = $ this ->executeOrder ();
8688 $ itens = $ order_created ->getItemIterator ()->getArrayCopy ();
8789 $ this ->assertEquals (100000 , $ itens [0 ]->price );
8890 $ this ->assertEquals (990 , $ itens [1 ]->price );
8991 }
9092
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+
91110 /**
92111 *MoipTest if the total is correct.
93112 */
0 commit comments