/** * Test for something * * @test * @throws \PHPUnit_Framework_Exception * @throws \TYPO3\CMS\Core\Exception * @return void */ public function locationWithAddressZipCityStateCountryGetStoredInCacheTableIfStreetAndStateIsEmpty() { $this->coordinatesCache->flushCache(); $data = array('address' => '', 'zipcode' => substr(mktime(), -5), 'city' => uniqid('City'), 'state' => '', 'country' => uniqid('Country')); $constraint = $this->getConstraintStub($data); $coordinate = array('latitude' => $constraint->getLatitude(), 'longitude' => $constraint->getLongitude()); $fields = array('address', 'zipcode', 'city', 'state', 'country'); $this->coordinatesCache->addCoordinateForAddress($constraint, $fields); $fields = array('zipcode', 'city', 'country'); $hash = $this->coordinatesCache->getHashForAddressWithFields($constraint, $fields); $this->assertEquals($coordinate, $this->coordinatesCache->getValueFromCacheTable($hash)); }