Ver código fonte

verifica si existe el servicio

Luciano Andrade 7 anos atrás
pai
commit
9e50abe1b5
1 arquivos alterados com 4 adições e 2 exclusões
  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);
 
     }
 }