[Mapbender-commits] r4700 - trunk/mapbender/test/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Sat Sep 26 06:30:00 EDT 2009
Author: christoph
Date: 2009-09-26 06:29:59 -0400 (Sat, 26 Sep 2009)
New Revision: 4700
Added:
trunk/mapbender/test/http/classes/GeoRssTest.php
Log:
Added: trunk/mapbender/test/http/classes/GeoRssTest.php
===================================================================
--- trunk/mapbender/test/http/classes/GeoRssTest.php (rev 0)
+++ trunk/mapbender/test/http/classes/GeoRssTest.php 2009-09-26 10:29:59 UTC (rev 4700)
@@ -0,0 +1,42 @@
+<?php
+require_once 'PHPUnit/Framework.php';
+require_once dirname(__FILE__) . "/../../../http/classes/class_georss_factory.php";
+
+class GeoRssTest extends PHPUnit_Framework_TestCase
+{
+
+ var $geoRss;
+
+ public function setUp () {
+ $this->geoRssFactory = new GeoRssFactory();
+ $filename = "../../data/GeoRss_PortalU.xml";
+ $this->geoRss = $this->geoRssFactory->createFromUrl($filename);
+ }
+
+ public function tearDown () {
+ unset($this->geoRssFactory);
+ }
+
+ public function testTitleCorrect()
+ {
+ $this->assertEquals(
+ "ingrid OpenSearch: wms datatype:metadata ranking:score",
+ $this->geoRss->channel_title
+ );
+ }
+ public function testDescriptionCorrect()
+ {
+ $this->assertEquals(
+ "Search results",
+ $this->geoRss->channel_description
+ );
+ }
+ public function testUrlCorrect()
+ {
+ $this->assertEquals(
+ "http://213.144.28.233:80/opensearch/query?q=wms+datatype:metadata+ranking:score&h=10&p=1&xml=1&georss=1&ingrid=1",
+ htmlentities($this->geoRss->channel_url, ENT_QUOTES, "UTF-8")
+ );
+ }
+}
+?>
\ No newline at end of file
More information about the Mapbender_commits
mailing list