public function testNotify() { $notificationCenter = new NotificationCenter(); $notificationCenter->addHandler(new HeaderHandler('Notify', NotificationCenter::ERROR)); $not[] = $notificationCenter->error('There was an error.'); $not[] = $notificationCenter->info('There was an info.'); $not[] = $notificationCenter->debug('There was a debug.'); $not[] = $notificationCenter->notify(new DetailedNotification('There is a notification', 'With a Title')); foreach ($not as $n) { $this->assertEquals(true, $n); } }
public function testNotify() { $notificationCenter = new NotificationCenter(); $notificationCenter->addHandler(new HeaderHandler('Notify', NotificationCenter::ERROR))->addHandler(new NullHandler()); $this->assertEquals($notificationCenter->error('There was an error.'), true); }