fix test suite
This commit is contained in:
@@ -58,6 +58,10 @@ class Address extends BaseAddress {
|
||||
*/
|
||||
public function preDelete(ConnectionInterface $con = null)
|
||||
{
|
||||
if($this->getIsDefault()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->dispatchEvent(TheliaEvents::BEFORE_DELETEADDRESS, new AddressEvent($this));
|
||||
return true;
|
||||
}
|
||||
@@ -71,14 +75,4 @@ class Address extends BaseAddress {
|
||||
$this->dispatchEvent(TheliaEvents::AFTER_DELETEADDRESS, new AddressEvent($this));
|
||||
}
|
||||
|
||||
public function preSave()
|
||||
{
|
||||
$valid = true;
|
||||
if($this->getIsDefault()) {
|
||||
$valid = false;
|
||||
}
|
||||
|
||||
return $valid;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user