Ver Fonte

Agregado del metodo setWebservice para el webservicemock

Your Name há 7 anos atrás
pai
commit
a3c4ea8be6
1 ficheiros alterados com 11 adições e 1 exclusões
  1. 11 1
      EventListener/DeviceListener.php

+ 11 - 1
EventListener/DeviceListener.php

@@ -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
      */