Beispiel #1
0
 /**
  * @link https://familysearch.org/developers/docs/api/places/Read_Place_Type_usecase
  */
 public function testReadPlaceType()
 {
     $this->fetchVocabElements();
     $type = $this->collection->readPlaceTypeById($this->vocabElements[0]->getId());
     $this->assertEquals(HttpStatus::OK, $type->getResponse()->getStatusCode(), $this->buildFailMessage(__METHOD__, $type));
     $element = $type->getVocabElement();
     $this->assertNotNull($element, "Vocabulary element should not be null.");
     $this->assertNotEmpty($element->getDescriptions(), "Vocabulary descriptions should not be empty.");
 }
Beispiel #2
0
 /**
  * @link https://familysearch.org/developers/docs/api/places/Read_Place_Type_usecase
  * @vcr PlacesTests/testReadPlaceType.json
  */
 public function testReadPlaceType()
 {
     $this->markTestSkipped('Too slow');
     $this->fetchVocabElements();
     $this->assertEquals(HttpStatus::OK, $this->vocabListState->getStatus(), $this->buildFailMessage(__METHOD__, $this->vocabListState));
     $this->assertNotEmpty($this->vocabElements, "Vocabulary list is empty.");
     $this->assertInstanceOf('\\Gedcomx\\Vocab\\VocabElement', $this->vocabElements[0], 'Vocab list does not appear to have parsed correctly.');
     $type = $this->collection->readPlaceTypeById($this->vocabElements[0]->getId(), QueryParameter::count('5'));
     $this->assertEquals(HttpStatus::OK, $type->getStatus(), $this->buildFailMessage(__METHOD__, $type));
     $element = $type->getVocabElement();
     $this->assertNotNull($element, "Vocabulary element should not be null.");
     $this->assertNotEmpty($element->getDescriptions(), "Vocabulary descriptions should not be empty.");
 }