Browse Source

verifica si existe el servicio

Luciano Andrade 7 years ago
parent
commit
9e50abe1b5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      tests/WebTestCaseBase.php

+ 4 - 2
tests/WebTestCaseBase.php

@@ -401,8 +401,10 @@ class WebTestCaseBase extends WebTestCase
         // creo el servicio de tenencias
         $this->fakeTenancyService();
 
-	static::$kernel->getContainer()->get('device.device_listener')->remoteCheck(false);
-	static::$kernel->getContainer()->get('device.device_validator')->remoteCheck(false);
+	if static::$kernel->getContainer()->has('device.device_listener')
+		static::$kernel->getContainer()->get('device.device_listener')->remoteCheck(false);
+	if static::$kernel->getContainer()->has('device.device_validator')
+		static::$kernel->getContainer()->get('device.device_validator')->remoteCheck(false);
 
     }
 }