/** * @covers sAdmin::sGetCountry */ public function testsGetCountry() { // Empty argument, return false $this->assertFalse($this->module->sGetCountry('')); // No matching country, return empty array $this->assertEquals(array(), $this->module->sGetCountry(-1)); // Valid country returns valid data $result = $this->module->sGetCountry('de'); $this->assertEquals(array('id' => '2', 'countryID' => '2', 'countryname' => 'Deutschland', 'countryiso' => 'DE', 'countryarea' => 'deutschland', 'countryen' => 'GERMANY', 'position' => '1', 'notice' => '', 'shippingfree' => '0'), $result); // Fetching for id or iso code gives the same result $this->assertEquals($this->module->sGetCountry($result['id']), $result); }