|
@@ -36,7 +36,7 @@ class DeviceListener
|
|
|
* @param string $devicePostUrl
|
|
|
* @param string $deviceDeletePostUrl
|
|
|
*/
|
|
|
- public function __construct($webservice, $devicePostUrl, $deviceDeletePostUrl, $devicePutUrl)
|
|
|
+ public function __construct(Webservice $webservice, $devicePostUrl, $deviceDeletePostUrl, $devicePutUrl)
|
|
|
{
|
|
|
$this->webservice = $webservice;
|
|
|
$this->devicePostUrl = $devicePostUrl;
|
|
@@ -45,6 +45,16 @@ class DeviceListener
|
|
|
$this->enabled = true;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Se utiliza para las pruebas de phpunit
|
|
|
+ * @param Webservice $webservice
|
|
|
+ */
|
|
|
+ public function setWebservice($webservice)
|
|
|
+ {
|
|
|
+ $this->webservice = $webservice;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* @param LifecycleEventArgs $args
|
|
|
*/
|