/** * @depends testFetchInventoryList */ public function testGetSupplyDetails($o) { $get = $o->getSupplyDetails(0); $x = array(); $x[0]['EarliestAvailableToPick'] = 'Immediately'; $x[0]['LatestAvailableToPick'] = 'Immediately'; $x[0]['Quantity'] = '1'; $x[0]['SupplyType'] = 'Normal'; $x[1]['EarliestAvailableToPick'] = 'today'; $x[1]['LatestAvailableToPick'] = 'tomorrow'; $x[1]['Quantity'] = '1'; $x[1]['SupplyType'] = 'Normal'; $this->assertEquals($x, $get); $get2 = $o->getSupplyDetails(0, 0); $this->assertEquals($x[0], $get2); $get3 = $o->getSupplyDetails(0, 1); $this->assertEquals($x[1], $get3); $get4 = $o->getSupplyDetails(0, 'wrong'); $this->assertEquals($x, $get4); $this->assertFalse($o->getSupplyDetails('wrong')); //not number $this->assertFalse($this->object->getSupplyDetails()); //not fetched yet for this object }