Пример #1
0
 /**
  * Test getTo method
  */
 public function testGetNotificationRecipients()
 {
     $todoModel = new Todo_Models_Todo();
     $todoModel->find(2);
     $response = $todoModel->getNotification()->getTo();
     $expected = array();
     $this->assertEquals($expected, $response);
     $todoModel->userId = 2;
     $todoModel->save();
     $response = $todoModel->getNotification()->getTo();
     $expected = array(2);
     $this->assertEquals($expected, $response);
     $todoModel->userId = 3;
     $todoModel->save();
     $response = $todoModel->getNotification()->getTo();
     $expected = array(3, 2);
     $this->assertEquals($expected, $response);
 }