public function testSetters() { $order = new Order(); $order->setBuyer(new Buyer()); $this->assertInstanceOf('Team3\\PayU\\Order\\Model\\Buyer\\BuyerInterface', $order->getBuyer()); $order->setProductCollection(new ProductCollection()); $this->assertInstanceOf('Team3\\PayU\\Order\\Model\\Products\\ProductCollectionInterface', $order->getProductCollection()); $order->setShippingMethodCollection(new ShippingMethodCollection()); $this->assertInstanceOf('Team3\\PayU\\Order\\Model\\ShippingMethods\\ShippingMethodCollectionInterface', $order->getShippingMethodCollection()); $order->setStatus(new OrderStatus()); $this->assertInstanceOf('Team3\\PayU\\Order\\Model\\OrderStatus', $order->getStatus()); $order->setShippingMethodCollectionFromDeserialization([new ShippingMethod(), new ShippingMethod()]); $this->assertCount(2, $order->getShippingMethodCollection()); $this->assertInstanceOf('Team3\\PayU\\Order\\Model\\ShippingMethods\\ShippingMethodCollection', $order->getShippingMethodCollection()); $order->setCreatedAt(new \DateTime(self::CREATED_AT)); $this->assertInstanceOf('\\DateTime', $order->getCreatedAt()); $this->assertEquals(self::CREATED_AT, $order->getCreatedAt()->format(self::CREATED_AT_FORMAT)); }