public function testSpecificChannels() { $notification = new SystemNotification(); $notification->Title = "Notify on event"; $notification->Description = 'Notifies on an event occurring'; $notification->NotificationText = 'This is a notfication to $Member.Email about $NotifyOnThis.Title'; $notification->Identifier = 'NOTIFY_ON_EVENT'; $notification->NotifyOnClass = 'NotifyOnThis'; $notification->write(); // okay, add it to our page $page = $this->objFromFixture('NotifyOnThis', 'not1'); $ns = new NotificationService(); $ds = new DummyNotificationSender(); Config::inst()->update('NotificationService', 'use_queues', false); $ns->addSender('dummy', $ds); $ns->notify('NOTIFY_ON_EVENT', $page, array(), 'dummy'); // now check that there was an actual notification added into our DS $this->assertEquals(1, count($ds->notifications)); $msg = $ds->notifications[0]; $this->assertEquals("This is a notfication to dummy@nowhere.com about Some Data Object", $msg->text); }