예제 #1
0
 /**
  * @test
  */
 public function updateRecord()
 {
     $this->sharepointHandler->expects($this->once())->method('update')->will($this->returnValue(array(array('title' => 'Kleinhans', 'firstname' => 'Julian', 'linktitle' => 'Kleinhans', 'id' => 9, 'contenttype' => 'Kunden'))));
     $fixture = $this->getFixture();
     $result = $fixture->updateRecord('{0344CAA0-94D5-40DE-A6EC-0D551BAC869D}', 9, array('title' => 'Kleinhans'));
     $this->assertSame('Kleinhans', $result[0]['title']);
     $this->assertSame('Julian', $result[0]['firstname']);
     $this->assertSame('Kleinhans', $result[0]['linktitle']);
     $this->assertSame(9, $result[0]['id']);
     $this->assertSame('Kunden', $result[0]['contenttype']);
 }
예제 #2
0
 /**
  * Update a specific record
  *
  * @param string $listIdentifier List identifier
  * @param string $recordIdentifier Record identifier
  * @param array $data
  * @return mixed
  */
 public function updateRecord($listIdentifier, $recordIdentifier, array $data)
 {
     return $this->sharepointHandler->update($listIdentifier, $recordIdentifier, $data);
 }
예제 #3
0
 private static function sharepoint($user)
 {
     $sp = new SharePointAPI("SAINTS/" . $user->user_id, $user->password(), static::NOTIFICATIONS_URL);
     $sp->setReturnType('object');
     return $sp;
 }