Notification: Remove Horde_Mobile dependency
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 4 Mar 2010 06:43:08 +0000 (23:43 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 4 Mar 2010 07:42:09 +0000 (00:42 -0700)
framework/Notification/lib/Horde/Notification/Listener/Status.php
framework/Notification/package.xml
framework/Notification/test/Horde/Notification/Class/Notification/Listener/StatusTest.php

index 28274d4..e7b9bc1 100644 (file)
@@ -27,10 +27,7 @@ class Horde_Notification_Listener_Status extends Horde_Notification_Listener
      * message stack.
      *
      * @param array $events   The list of events to handle.
-     * @param array $options  An array of options:
-     * <pre>
-     * 'mobile' - (Horde_Mobile) The mobile object to send status lines to.
-     * </pre>
+     * @param array $options  An array of options. Not used.
      */
     public function notify($events, $options = array())
     {
@@ -38,13 +35,6 @@ class Horde_Notification_Listener_Status extends Horde_Notification_Listener
             return;
         }
 
-        if (!empty($options['mobile']) && class_exists('Horde_Mobile_Text')) {
-            foreach ($events as $event) {
-                $options['mobile']->add(new Horde_Mobile_Text(strip_tags($event)));
-            }
-            return;
-        }
-
         echo '<ul class="notices">';
 
         foreach ($events as $event) {
index 8f2bed0..e3cafaf 100644 (file)
@@ -113,10 +113,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
     <channel>pear.horde.org</channel>
    </package>
    <package>
-    <name>Mobile</name>
-    <channel>pear.horde.org</channel>
-   </package>
-   <package>
     <name>Nls</name>
     <channel>pear.horde.org</channel>
    </package>
index 71576b9..6a21776 100644 (file)
@@ -60,19 +60,4 @@ class Horde_Notification_Class_Notification_Listener_StatusTest extends PHPUnit_
         $listener->notify($messages);
     }
 
-    public function testMethodNotifyHasMobileOutputIfTheMobileOptionWasSet()
-    {
-        if (!class_exists('Horde_Mobile')) {
-            $this->markTestSkipped('The Horde_Mobile package is not installed!');
-        }
-        $mobile = $this->getMock('Horde_Mobile', array(), array(), '', false, false);
-        $mobile->expects($this->once())
-            ->method('add')
-            ->with($this->isInstanceOf('Horde_Mobile_Text'));
-        $listener = new Horde_Notification_Listener_Status();
-        $event = new Horde_Notification_Event('<b>test</b>');
-        $messages = array($event);
-        $listener->notify($messages, array('mobile' => $mobile));
-    }
-
 }