Added tests for new cases with non-locatable addresses

This commit is contained in:
Alejandro Celaya
2019-02-26 22:31:07 +01:00
parent 2d1d7357a3
commit 30bf1c2641
5 changed files with 131 additions and 6 deletions

View File

@@ -72,4 +72,16 @@ class VisitLocation extends AbstractEntity implements VisitLocationInterface
'timezone' => $this->timezone,
];
}
public function isEmpty(): bool
{
return
$this->countryCode === '' &&
$this->countryName === '' &&
$this->regionName === '' &&
$this->cityName === '' &&
((float) $this->latitude) === 0.0 &&
((float) $this->longitude) === 0.0 &&
$this->timezone === '';
}
}