public function testFetchItems() { $this->object->setMock(true, array('fetchOrderList.xml', 'fetchOrderItems.xml')); $this->object->fetchOrders(); resetLog(); $get = $this->object->fetchItems(); $this->assertInternalType('array', $get); $this->assertEquals(3, count($get)); $this->assertInternalType('object', $get[0]); $this->assertInternalType('object', $get[1]); $this->assertInternalType('object', $get[2]); $getOne = $this->object->fetchItems('string', 0); //$token will be set to false $this->assertInternalType('object', $getOne); $o = new AmazonOrderList('testStore', true, null, __DIR__ . '/../../test-config.php'); $this->assertFalse($o->fetchItems()); //not fetched yet for this object }