diff --git a/src/Observers/RealEstateDevelopment/ParameterObserver.php b/src/Observers/RealEstateDevelopment/ParameterObserver.php index 2574029..94ed6dd 100644 --- a/src/Observers/RealEstateDevelopment/ParameterObserver.php +++ b/src/Observers/RealEstateDevelopment/ParameterObserver.php @@ -3,12 +3,17 @@ namespace Bildvitta\IssSupernova\Observers\RealEstateDevelopment; use Bildvitta\IssSupernova\IssSupernova; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; class ParameterObserver { public function created($parameter) { + if (App::runningUnitTests()) { + return; + } + $parameter->loadMissing('realEstateDevelopment'); $data = $parameter->toArray(); $data['sync_to'] = 'sys'; @@ -25,6 +30,10 @@ public function created($parameter) public function updated($parameter) { + if (App::runningUnitTests()) { + return; + } + $parameter->loadMissing('realEstateDevelopment'); $data = $parameter->toArray(); $data['sync_to'] = 'sys'; diff --git a/src/Observers/RealEstateDevelopment/RealEstateDevelopmentObserver.php b/src/Observers/RealEstateDevelopment/RealEstateDevelopmentObserver.php index 59b191a..f876894 100644 --- a/src/Observers/RealEstateDevelopment/RealEstateDevelopmentObserver.php +++ b/src/Observers/RealEstateDevelopment/RealEstateDevelopmentObserver.php @@ -3,12 +3,17 @@ namespace Bildvitta\IssSupernova\Observers\RealEstateDevelopment; use Bildvitta\IssSupernova\IssSupernova; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; class RealEstateDevelopmentObserver { public function created($realEstateDeveloptment) { + if (App::runningUnitTests()) { + return; + } + $data = $realEstateDeveloptment->toArray(); $data['sync_to'] = 'sys'; @@ -24,6 +29,10 @@ public function created($realEstateDeveloptment) public function updated($realEstateDeveloptment) { + if (App::runningUnitTests()) { + return; + } + $data = $realEstateDeveloptment->toArray(); $data['sync_to'] = 'sys'; diff --git a/src/Observers/RealEstateDevelopment/TypologyObserver.php b/src/Observers/RealEstateDevelopment/TypologyObserver.php index bd3fcdb..60e2b75 100644 --- a/src/Observers/RealEstateDevelopment/TypologyObserver.php +++ b/src/Observers/RealEstateDevelopment/TypologyObserver.php @@ -3,12 +3,17 @@ namespace Bildvitta\IssSupernova\Observers\RealEstateDevelopment; use Bildvitta\IssSupernova\IssSupernova; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; class TypologyObserver { public function created($parameter) { + if (App::runningUnitTests()) { + return; + } + $parameter->loadMissing('realEstateDevelopment'); $data = $parameter->toArray(); $data['sync_to'] = 'sys'; @@ -25,6 +30,10 @@ public function created($parameter) public function updated($parameter) { + if (App::runningUnitTests()) { + return; + } + $parameter->loadMissing('realEstateDevelopment'); $data = $parameter->toArray(); $data['sync_to'] = 'sys'; diff --git a/src/Observers/RealEstateDevelopment/UnitObserver.php b/src/Observers/RealEstateDevelopment/UnitObserver.php index 64b3115..558f624 100644 --- a/src/Observers/RealEstateDevelopment/UnitObserver.php +++ b/src/Observers/RealEstateDevelopment/UnitObserver.php @@ -3,12 +3,17 @@ namespace Bildvitta\IssSupernova\Observers\RealEstateDevelopment; use Bildvitta\IssSupernova\IssSupernova; +use Illuminate\Support\Facades\App; use Illuminate\Support\Facades\Log; class UnitObserver { public function created($parameter) { + if (App::runningUnitTests()) { + return; + } + $parameter->loadMissing( 'realEstateDevelopment', 'typology', @@ -32,6 +37,10 @@ public function created($parameter) public function updated($parameter) { + if (App::runningUnitTests()) { + return; + } + $parameter->loadMissing( 'realEstateDevelopment', 'typology',