Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
eSlider committed May 23, 2016
1 parent d8b986f commit 4d9907f
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions Tests/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

use WFS\Component\Driver;
use WFS\Entity\Capabilities;
use WFS\Entity\FeatureTypeList;
use WFS\Entity\OperationsMetadata;
use WFS\Entity\ServiceProvider;

/**
*
Expand Down Expand Up @@ -46,14 +43,30 @@ public function testGetFeature()
//&format_options=callback:loadFeatures&srsname=EPSG:3857&bbox=-8922952.933898335,5361598.912035402,-8913168.994277833,5371382.851655904,EPSG:3857&_=1463585466550
}

public function testGetCapabilities()
/**
* @test
*/
public function getCapabilities()
{
$caps = $this->driver->convertXmlToSimpleArray(
file_get_contents(
//"vendor/opengis/wfs/2.0.0/examples/GetCapabilities/GetCapabilities_Res_02.xml"
self::XML_PATH . "/2.0.0/GetCapabilities.xml"
));
$capabilities = new Capabilities($caps);
$xml = $this->testShrinkAndConvertXML();
$capabilities = new Capabilities($xml);
$capabilities->getFeatureTypeList();
}

/**
* @return array
*/
public function testShrinkAndConvertXML()
{
static $xml = null;
if (!$xml) {
$xml = $this->driver->convertXmlToSimpleArray(
file_get_contents(
//"vendor/opengis/wfs/2.0.0/examples/GetCapabilities/GetCapabilities_Res_02.xml"
self::XML_PATH . "/2.0.0/GetCapabilities.xml"
));
}
return $xml;
}

}

0 comments on commit 4d9907f

Please sign in to comment.