diff --git a/tests/Functional/GedcomxFileTests.php b/tests/Functional/GedcomxFileTests.php index 60bcc45..4440429 100644 --- a/tests/Functional/GedcomxFileTests.php +++ b/tests/Functional/GedcomxFileTests.php @@ -16,7 +16,7 @@ class GedcomxFileTests extends ApiTestCase public function testReadGedcomxFile() { - $gedcomx = new GedcomxFile($this->testRootDir.'sample.gedx'); + $gedcomx = new GedcomxFile($this->testRootDir.'/files/sample.gedx'); $this->assertEquals( 'FamilySearch Platform API 0.1', @@ -71,7 +71,7 @@ public function testXMLDeserialization() { $resources = array(); - $gedcomx = new GedcomxFile($this->testRootDir.'sample.gedx'); + $gedcomx = new GedcomxFile($this->testRootDir.'/files/sample.gedx'); $entries = $gedcomx->getEntries(); foreach($entries as $entry){ diff --git a/tests/Functional/XMLTests.php b/tests/Functional/XMLTests.php new file mode 100644 index 0000000..a83c6fe --- /dev/null +++ b/tests/Functional/XMLTests.php @@ -0,0 +1,20 @@ +XML(file_get_contents($this->testRootDir.'/files/record.xml')); + $gedcomX = new Gedcomx($xmlReader); + $extenstions = $gedcomX->getPersons()[0]->getSources()[0]->getExtensionElements(); + $this->assertEquals(3, count($extenstions)); + } + +} diff --git a/tests/files/record.xml b/tests/files/record.xml new file mode 100644 index 0000000..9f38d04 --- /dev/null +++ b/tests/files/record.xml @@ -0,0 +1,141 @@ + + + + + + + + + 2016-03-12T03:23:01.569Z + same + + + https://familysearch.org/ark:/61903/4:1:L2KF-NLB + false + + + + + 2016-03-12T03:22:44.419Z + + + + + + + 2016-05-18T23:28:33.853Z + Middle name used in Ancestry Family Tree + + true + + Dora Iucho Morrell + + + + + + + + + 2016-05-18T23:29:58.013Z + Age in 1860 New York City census + + + 1856 + +1856 + 1856 + 1856 + + + New York, United States + New York, United States + New York, United States + + + + + + + 2016-05-20T01:56:16.996Z + Ancestry Family Tree; New York, New York City Municipal Deaths + + + 27 December 1899 + +1899-12-27 + 27 December 1899 + 27 December 1899 + + + Manhattan, New York County, New York, United States + Manhattan, New York County, New York, United States + Manhattan, New York County, New York, United States + + + + + + + 2016-03-12T03:23:05.419Z + same + + + 1880 + +1880 + 1880 + 1880 + + + New York, New York, New York, United States + New York City, New York County, New York, United States + New York, New York, New York, United States + + + + 1 + 1856 + New York, United States + 27 December 1899 + Manhattan, New York County, New York, United States + 1 + + + + + + Female + 1856-1899 + Dora Iucho Morrell + + + + http://familysearch.org/platform/tree/child-and-parents-relationships/MT5B-VYX + + + + + http://familysearch.org/platform/tree/child-and-parents-relationships/MT5B-VYX + + + + + + "Family Tree," database, <i>FamilySearch</i> (http://familysearch.org : modified 06 July 2016, 02:04), entry for Dora Iucho Morrell(PID https://familysearch.org/ark:/61903/4:1:L2KF-NLB); contributed by various users. + + + Dora Iucho Morrell + https://familysearch.org/ark:/61903/4:1:L2KF-NLB + 2016-07-06T02:04:12Z + + + New York, United States + New York, United States + + + Manhattan, New York County, New York, United States + Manhattan, New York County, New York, United States + + + New York City, New York County, New York, United States + New York, New York, New York, United States + + \ No newline at end of file diff --git a/tests/sample.gedx b/tests/files/sample.gedx similarity index 100% rename from tests/sample.gedx rename to tests/files/sample.gedx