<?php

require_library('connectors/HydrothermalVentLarvaeAPI');

class test_connector_vent_larvae_api extends SimpletestUnitBase
{
    function testVentLarvaeAPI()
    {
        $url = "http://www.whoi.edu/vent-larval-id/MiscSpecies.htm";    
        
        $taxa = HydrothermalVentLarvaeAPI::get_larvae_taxa($url);
        $this->assertTrue(is_array($taxa), 'Taxa should be an array');
        
        $taxon = $taxa[0];
        $this->assertIsA($taxon, 'SchemaTaxon', 'Response should be an array of SchemaTaxon');
        
        $dataObject = $taxon->dataObjects[0];
        $this->assertIsA($dataObject, 'SchemaDataObject', 'Taxon should have a data object');
    }
}

?>
<?php

require_library('connectors/HydrothermalVentLarvaeAPI');

class test_connector_vent_larvae_api extends SimpletestUnitBase
{
    function testVentLarvaeAPI()
    {
        //$url = "http://www.whoi.edu/vent-larval-id/MiscSpecies.htm";    
        $url = "http://pandanus.eol.org/public/test_resources/MiscSpecies.htm";
        
        $taxa = HydrothermalVentLarvaeAPI::get_larvae_taxa($url);
        $this->assertTrue(is_array($taxa), 'Taxa should be an array');
        
        $taxon = $taxa[0];
        $this->assertIsA($taxon, 'SchemaTaxon', 'Response should be an array of SchemaTaxon');
        
        $dataObject = $taxon->dataObjects[0];
        $this->assertIsA($dataObject, 'SchemaDataObject', 'Taxon should have a data object');
    }
}

?>
Change source URL for test.
Change source URL for test.

git-svn-id: d46fe582d22b46b457d3ac1c55a88da2fbe913a1@1235 baf6b65b-9124-4dc3-b1c0-01155b4af546
