Beispiel #1
0
 public function testAddActionSecondPrimary()
 {
     /** @var \OCP\Notification\IAction|\PHPUnit_Framework_MockObject_MockObject $action */
     $action = $this->getMockBuilder('OCP\\Notification\\IAction')->disableOriginalConstructor()->getMock();
     $action->expects($this->exactly(2))->method('isValid')->willReturn(true);
     $action->expects($this->exactly(2))->method('isPrimary')->willReturn(true);
     $this->assertSame($this->notification, $this->notification->addAction($action));
     $this->setExpectedException('\\InvalidArgumentException');
     $this->notification->addAction($action);
 }