예제 #1
0
파일: calendartest.php 프로젝트: gvde/core
 /**
  * @dataProvider dataPropPatch
  */
 public function testPropPatch($mutations, $throws)
 {
     /** @var \PHPUnit_Framework_MockObject_MockObject | CalDavBackend $backend */
     $backend = $this->getMockBuilder('OCA\\DAV\\CalDAV\\CalDavBackend')->disableOriginalConstructor()->getMock();
     $calendarInfo = ['{http://owncloud.org/ns}owner-principal' => 'user1', 'principaluri' => 'user2', 'id' => 666];
     $c = new Calendar($backend, $calendarInfo);
     if ($throws) {
         $this->setExpectedException('\\Sabre\\DAV\\Exception\\Forbidden');
     }
     $c->propPatch(new PropPatch($mutations));
     if (!$throws) {
         $this->assertTrue(true);
     }
 }