/** * @covers AmazonCore::setMock * @dataProvider mockProvider */ public function testSetMock($a, $b, $c, $d = null) { resetLog(); $this->object->setMock($a, $b); $check = parseLog(); if (is_bool($a) && $a || $b) { $this->assertEquals($c, $check[0]); } if ($d) { $this->assertEquals($d, $check[1]); } }
public function testFetchServiceStatus() { resetLog(); $this->object->setMock(true, 'fetchServiceStatus.xml'); $this->assertFalse($this->object->fetchServiceStatus()); //no service set yet $this->object->setService('Inbound'); $this->assertNull($this->object->fetchServiceStatus()); //now it is good $o = $this->object->getOptions(); $this->assertEquals('GetServiceStatus', $o['Action']); $check = parseLog(); $this->assertEquals('Single Mock File set: fetchServiceStatus.xml', $check[1]); $this->assertEquals('Service must be set in order to retrieve status', $check[2]); $this->assertEquals('Fetched Mock File: mock/fetchServiceStatus.xml', $check[3]); return $this->object; }