Index: src/webservice/tests/SetupTest.php
===================================================================
--- src/webservice/tests/SetupTest.php	(revision 8c356c136998b9a3dcbd43e23688c189ef78f80f)
+++ src/webservice/tests/SetupTest.php	(revision 8c356c136998b9a3dcbd43e23688c189ef78f80f)
@@ -0,0 +1,90 @@
+<?php
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+class SetupTest extends PHPUnit_Framework_TestCase
+{
+	public static function setUpBeforeClass()
+	{
+		global $testconfig;
+
+		$file = __DIR__ ."/testconfig/testconfig.php";
+		self::assertFileExists($file);
+		require($file);
+		self::$_testconfig = $testconfig;
+		
+		require_once($testconfig["webserviceDirectory"] ."/inc/envsetup.php");
+		
+		self::$_webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
+		self::assertNotNull(self::$_webserviceConfig);
+		
+		self::$_dataDirectory = self::$_webserviceConfig->getConfig("dataDirectory");
+		self::assertInternaltype("string", self::$_dataDirectory);
+		self::assertTrue(!empty(self::$_dataDirectory));
+		self::assertTrue(!file_exists(self::$_dataDirectory));
+	}
+	
+	public static function tearDownAfterClass()
+	{
+		if(!file_exists(self::$_dataDirectory)){
+			return;
+		}
+		// clear data directory (not recursive, because there should be only a database file in it
+		$content = scandir(self::$_dataDirectory);
+		self::assertInternalType("array", $content);
+		foreach($content as $file){
+			if(!in_array($file, array(".",".."))){
+				self::assertTrue(unlink(self::$_dataDirectory ."/". $file));
+			}
+		}
+		
+		// remove datadirectory
+		self::assertTrue(rmdir(self::$_dataDirectory));
+	}
+
+	public function testSetupBeginning() {
+		require_once(self::$_testconfig["webserviceDirectory"] ."/SiWeather/Webservice/Setup.php");
+		$setup = new SiWeather\Webservice\Setup();
+
+		$errorMessage = "";
+		$result = $setup->dataDirectoryCheck($errorMessage);
+		$this->assertEquals($result, SiWeather\Webservice\DataDirectoryChecks::NotExist, $errorMessage);
+
+		// create data directory
+		$result = $setup->dataDirectoryCreate($errorMessage);
+		$this->assertEquals($result, SiWeather\Webservice\DataDirectoryChecks::Success, $errorMessage);
+
+		$result = $setup->databaseDirectoryCheck($errorMessage);
+		$this->assertNotEquals($result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
+		$result = $setup->databaseFileCheck($errorMessage);
+		$this->assertNotEquals($result, SiWeather\Webservice\DatabaseChecks::Success, $errorMessage);
+		$this->assertTrue(!$setup->databaseConnection($errorMessage), $errorMessage);
+
+		$prefix = "Database up and running";
+		$versionSqlite = $setup->databaseVersionSqlite($errorMessage);
+		$this->assertLessThan($versionSqlite, 0, $prefix ." (Could not determine SQLite version: ". $errorMessage .")");
+		$versionSpatalite = $setup->databaseVersionSpatalite($errorMessage);
+		$this->assertLessThan($versionSpatalite, 0, $prefix ." (Could not determine Spatalite version: ". $errorMessage .")");
+   }
+   
+   protected static $_webserviceConfig;
+   protected static $_dataDirectory;
+   protected static $_testconfig;
+}
+?>
Index: src/webservice/tests/SpatialiteTest.php
===================================================================
--- src/webservice/tests/SpatialiteTest.php	(revision 8c356c136998b9a3dcbd43e23688c189ef78f80f)
+++ src/webservice/tests/SpatialiteTest.php	(revision 8c356c136998b9a3dcbd43e23688c189ef78f80f)
@@ -0,0 +1,209 @@
+<?php
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+class SpatialiteTest extends PHPUnit_Framework_TestCase
+{
+	public static function setUpBeforeClass()
+	{
+		global $testconfig;
+
+		self::$_databaseFile = tempnam(sys_get_temp_dir(), "siw");
+		# PDO SQlite is not able to load extensions (caused by the sqlite pdo driver)
+		# therefore we use PHP SQlite module
+		self::$_database = new SQLite3(self::$_databaseFile);
+		
+		$file = __DIR__ ."/testconfig/testconfig.php";
+		self::assertFileExists($file);
+		require($file);
+		require_once($testconfig["webserviceDirectory"] ."/SiWeather/Webservice/WebserviceConfig.php");
+		
+		self::$_webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
+		self::assertNotNull(self::$_webserviceConfig);
+	}
+	
+	public static function tearDownAfterClass()
+	{
+		self::assertTrue(self::$_database->close());
+		self::assertTrue(unlink(self::$_databaseFile));
+		self::$_database = null;
+		self::$_databaseFile = null;
+	}
+
+	public function testLoadSpatialite()
+	{
+		$this->assertInstanceOf("SQLite3", self::$_database);
+
+		# loading SpatiaLite as an extension
+		if(!self::$_database->loadExtension(self::$_webserviceConfig->getConfig("spatialiteExtension"))){
+			echo "Could not load SpatialLite extension: ". self::$_database->lastErrorMsg();
+			return;
+		}
+		
+		$this->assertTrue(self::$_database->exec("BEGIN"));
+		$this->assertTrue(self::$_database->exec("SELECT InitSpatialMetadata()"));
+		$this->assertTrue(self::$_database->exec("COMMIT"));
+		
+		# reporting some version info
+		$rs = self::$_database->query("SELECT spatialite_version()");
+		$this->assertInstanceOf('SQLite3Result', $rs);
+		$row = $rs->fetchArray();
+		$this->assertInternalType("array", $row);
+		$this->assertGreaterThan(1, count($row));
+		$this->assertTrue(!empty($row[0]));
+		$row = $rs->fetchArray();
+		$this->assertTrue(!$row);
+	}
+	
+	public function testDistance()
+	{
+		$this->assertInstanceOf("SQLite3", self::$_database);
+
+		$table = "cities";
+		
+		# creating a POINT table
+		$sql  = "CREATE TABLE ". $table ." (";
+		$sql .= "id INTEGER NOT NULL PRIMARY KEY,";
+		$sql .= "name TEXT NOT NULL)";
+		$this->assertTrue(self::$_database->exec($sql));
+
+		# creating a POINT Geometry column named center,
+		# taking two coordinates in SRID 4326 (WGS84) format
+		$sql  = "SELECT AddGeometryColumn(\"". $table ."\", ";
+		$sql .= "\"center\", 4326, \"POINT\", \"XY\")";
+		$this->assertTrue(self::$_database->exec($sql));
+		
+		# insert some cities
+		# the center must be described in WKT (s. http://giswiki.org/wiki/WKT) format for a point.
+		# Since we use WGS84 with SRID 4326 as a coordinate system, it expects POINT(LONGITUDE LATITUDE)
+		# as values.
+		# CITY, LATITUDE, LONGITUDE
+		# example Berlin:
+		#   52°31′7″N, 13°24′30″E
+		#   --> 52.518611° Latitude and 13.408333° Longitude
+		#   --> $values[] = array("name" => "Berlin", "latitude" => 52.518611, "longitude" => 13.408333);
+		#   --> POINT("13.408333 52.518611")
+		$values = array();
+		$values[] = array("name" => "Berlin", 			"latitude" => 52.518611, 	"longitude" => 13.408333);
+		$values[] = array("name" => "Potsdam", 			"latitude" => 52.395833, 	"longitude" => 13.061389);
+		$values[] = array("name" => "Hamburg", 			"latitude" => 53.550556, 	"longitude" => 9.993333);
+		$values[] = array("name" => "Dresden", 			"latitude" => 51.049259, 	"longitude" => 13.73836);
+		$values[] = array("name" => "Cape Town",		"latitude" => -33.922667, 	"longitude" => 18.416689);
+		$values[] = array("name" => "New York City", 	"latitude" => 40.712778, 	"longitude" => -74.005833);
+		$values[] = array("name" => "Sydney", 			"latitude" => -33.85, 		"longitude" => 151.2);
+		
+		# distances in meter
+		$distances = array();
+		$distances["Berlin"] = array();
+		$distances["Berlin"]["Potsdam"] = 27185;
+		$distances["Berlin"]["Hamburg"] = 255518;
+		$distances["Berlin"]["Dresden"] = 164954;
+		$distances["Berlin"]["Cape Town"] = 9624137;
+		$distances["Berlin"]["New York City"] = 6385266;
+		$distances["Berlin"]["Sydney"] = 16092238;
+		
+		$distances["Potsdam"] = array();
+		$distances["Potsdam"]["Hamburg"] = 242231;
+		$distances["Potsdam"]["Dresden"] = 156823;
+		$distances["Potsdam"]["Cape Town"] =9612288;
+		$distances["Potsdam"]["New York City"] = 6370104;
+		$distances["Potsdam"]["Sydney"] = 16118486;
+		
+		$distances["Hamburg"] = array();
+		$distances["Hamburg"]["Dresden"] = 377003;
+		$distances["Hamburg"]["Cape Town"] = 9760489;
+		$distances["Hamburg"]["New York City"] = 6129909;
+		$distances["Hamburg"]["Sydney"] = 16275543;
+		
+		$distances["Dresden"] = array();
+		$distances["Dresden"]["Cape Town"] = 9459562;
+		$distances["Dresden"]["New York City"] = 6478589;
+		$distances["Dresden"]["Sydney"] = 16109156;
+		
+		$distances["Cape Town"] = array();
+		$distances["Cape Town"]["New York City"] = 12564111;
+		$distances["Cape Town"]["Sydney"] = 11013398;
+		
+		$distances["New York City"] = array();
+		$distances["New York City"]["Sydney"] = 15988687;
+		
+		$this->assertTrue(self::$_database->exec("BEGIN"));
+		$sql  = "INSERT INTO ". $table ." (name, center) VALUES(:name, GeomFromText(:center, 4326))";
+		$sqlStatement = self::$_database->prepare($sql);
+		foreach ($values as $value){
+			$sqlStatement->clear();
+			$this->assertEquals(3, count($value));
+			$this->assertTrue($sqlStatement->bindValue(":name", $value["name"]));
+			$this->assertTrue($sqlStatement->bindValue(":center", "POINT(". $value["longitude"] ." ". $value["latitude"] .")"));
+			$this->assertInstanceOf("SQLite3Result", $sqlStatement->execute());
+			$sqlStatement->reset();
+		}
+		$this->assertTrue(self::$_database->exec("COMMIT"));
+		
+		# check the inserts
+		$sql  = "SELECT id, name, X(center) as longitude, Y(center) as latitude FROM ". $table ." WHERE name=:name";
+		$sqlStatement = self::$_database->prepare($sql);
+		foreach ($values as $value){
+			$sqlStatement->clear();
+			$this->assertEquals(3, count($value));
+			$this->assertTrue($sqlStatement->bindValue(":name", $value["name"]));
+			$result = $sqlStatement->execute();
+			$this->assertInstanceOf("SQLite3Result", $result);
+			while($row = $result->fetchArray()){
+				$this->assertGreaterThan(4, count($row));
+				$this->assertGreaterThan(-1, $row[0]);
+				$this->assertEquals($value["name"], $row[1]);
+				$this->assertEquals($value["longitude"], $row[2]);
+				$this->assertEquals($value["latitude"], $row[3]);
+			}
+			$sqlStatement->reset();
+		}
+
+		# calculate the distances
+		# Calling Distance() with three parameters, which returns distance in Meter
+		$sql  = "SELECT t1.name, t2.name, Round(Distance(t1.center, t2.center, 1), 0) As distance";
+		$sql .= "  FROM ". $table ." AS t1, ". $table ." AS t2";
+		$sql .= "  WHERE t1.name=:from AND t2.name=:to";
+		$sqlStatement = self::$_database->prepare($sql);
+		foreach(array_keys($distances) as $start){
+			foreach(array_keys($distances[$start]) as $end){
+				$sqlStatement->clear();
+				# Calculate distance from start --> end
+				$this->assertTrue($sqlStatement->bindValue(":from", $start));
+				$this->assertTrue($sqlStatement->bindValue(":to", $end));
+				$result = $sqlStatement->execute();
+				$this->assertInstanceOf("SQLite3Result", $result);
+				while($row = $result->fetchArray()){
+					$this->assertGreaterThan(3, count($row));
+					$this->assertEquals($start, $row[0]);
+					$this->assertEquals($end, $row[1]);
+					# 0.5% difference of the distance is accepted
+					$delta = abs($distances[$start][$end] - $row[2])/$distances[$start][$end];
+					$this->assertLessThan(0.005, $delta, $start ." --> ". $end .":\n  Expected: ". $distances[$start][$end] ."\n  Is: ". $row[2]);
+				}
+				$sqlStatement->reset();
+			}
+		}
+	}
+
+	protected static $_databaseFile;
+	protected static $_database;
+	protected static $_webserviceConfig;
+}
+?>
Index: src/webservice/tests/StationsTest.php
===================================================================
--- src/webservice/tests/StationsTest.php	(revision 8c356c136998b9a3dcbd43e23688c189ef78f80f)
+++ src/webservice/tests/StationsTest.php	(revision 8c356c136998b9a3dcbd43e23688c189ef78f80f)
@@ -0,0 +1,86 @@
+<?php
+/*
+    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+    MA 02110-1301  USA.
+*/
+
+class StationsTest extends PHPUnit_Framework_TestCase
+{
+    protected function setUp()
+    {
+		$file = __DIR__ ."/testconfig/testconfig.php";
+		$this->assertFileExists($file);
+		require($file);
+		$this->_testconfig = $testconfig; 
+		$this->assertNotNull($this->_testconfig);
+		
+		require_once($testconfig["webserviceDirectory"] ."/SiWeather/Webservice/WebserviceConfig.php");
+		
+		$this->_webserviceConfig = new SiWeather\Webservice\WebserviceConfig();
+		$this->assertNotNull($this->_webserviceConfig);
+    }
+
+	public function testEmptyStations()
+	{
+		$stations = $this->query("index.php/stations");
+
+		$this->assertInternalType("array", $stations);
+		$this->assertEquals(count($stations), 0);
+	}
+	
+	public function testStationRewrite()
+	{
+		$apiVersion = $this->_webserviceConfig->getConfig("webserviceApiVersion");
+		$this->assertInternalType('string', $apiVersion);
+		$this->assertTrue(!empty($apiVersion));
+
+		$stations = $this->query($apiVersion ."/stations");
+
+		$this->assertInternalType("array", $stations);
+		$this->assertEquals(count($stations), 0);
+	}
+	
+	protected function query($url){
+		require(__DIR__ ."/../vendor/autoload.php");
+
+		$baseUrl = $this->_webserviceConfig->getConfig("webserviceBaseUrl");
+		$this->assertInternalType('string', $baseUrl);
+		$this->assertTrue(!empty($baseUrl));
+		$client = new GuzzleHttp\Client
+		(
+			[
+				"base_uri" => $baseUrl,
+				"timeout" => 2.0,
+				"http_errors" => false,
+			]
+		);
+		$response = $client->get($url);
+		$this->assertNotNull($response);
+		$this->assertEquals($response->getStatusCode(), 200);
+		$this->assertEquals($response->getReasonPhrase(), "OK");
+
+		$body = $response->getBody();
+		$this->assertTrue(!empty($body));
+		$json = json_decode($body);
+		$this->assertNotNull($json);
+		return $json;
+	}
+	
+	protected $_testconfig;
+	protected $_webserviceConfig;
+}
+?>
Index: src/webservice/tests/TestSpatiallite.php
===================================================================
--- src/webservice/tests/TestSpatiallite.php	(revision 8f38d1eb0d2e82eb85c37617864c60c37bfebf83)
+++ 	(revision )
@@ -1,187 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-class TestSpatialiteExtension extends PHPUnit_Framework_TestCase
-{
-	public static function setUpBeforeClass()
-	{
-		self::$_databaseFile = tempnam(sys_get_temp_dir(), "siw");
-		# PDO SQlite is not able to load extensions (caused by the sqlite pdo driver)
-		# therefore we use PHP SQlite module
-		self::$_database = new SQLite3(self::$_databaseFile);
-	}
-	
-	public static function tearDownAfterClass()
-	{
-		self::$_database->close();
-		unlink(self::$_databaseFile);
-		self::$_database = null;
-		self::$_databaseFile = null;
-	}
-
-	public function testLoadSpatialite()
-	{
-		$this->assertInstanceOf("SQLite3", self::$_database);
-
-		# loading SpatiaLite as an extension
-		if(!self::$_database->loadExtension("mod_spatialite.so")){
-			echo "Could not load SpatialLite extension: ". self::$_database->lastErrorMsg();
-			return;
-		}
-		
-		$this->assertTrue(self::$_database->exec("BEGIN"));
-		$this->assertTrue(self::$_database->exec("SELECT InitSpatialMetadata()"));
-		$this->assertTrue(self::$_database->exec("COMMIT"));
-		
-		# reporting some version info
-		$rs = self::$_database->query("SELECT spatialite_version()");
-		$this->assertInstanceOf('SQLite3Result', $rs);
-		$row = $rs->fetchArray();
-		$this->assertInternalType("array", $row);
-		$this->assertGreaterThan(1, count($row));
-		$this->assertTrue(!empty($row[0]));
-		$row = $rs->fetchArray();
-		$this->assertTrue(!$row);
-	}
-	
-	public function testDistance()
-	{
-		$this->assertInstanceOf("SQLite3", self::$_database);
-
-		$table = "cities";
-		
-		# creating a POINT table
-		$sql  = "CREATE TABLE ". $table ." (";
-		$sql .= "id INTEGER NOT NULL PRIMARY KEY,";
-		$sql .= "name TEXT NOT NULL)";
-		$this->assertTrue(self::$_database->exec($sql));
-
-		# creating a POINT Geometry column named center,
-		# taking two coordinates in SRID 4326 (WGS84) format
-		$sql  = "SELECT AddGeometryColumn(\"". $table ."\", ";
-		$sql .= "\"center\", 32632, \"POINT\", \"XY\")";
-		$this->assertTrue(self::$_database->exec($sql));
-		
-		# insert some cities
-		# the center must be described in WKT (s. http://giswiki.org/wiki/WKT) format for a point.
-		# since we use WGS84 as a coordinate system, 
-		# CITY, LATITUDE, LONGITUDE
-		$values = array();
-		$values[] = array("Berlin", 52.518611, 13.408333);
-		$values[] = array("Potsdam", 52.395833, 13.061389);
-		$values[] = array("Hamburg", 53.550556, 9.993333);
-		$values[] = array("Dresden", 51.049259, 13.73836);
-		$values[] = array("Cape Town", -33.922667, 18.416689);
-		$values[] = array("New York City", 40.712778, -74.005833);
-		$values[] = array("Sydney", -33.85, 151.2);
-		
-		# distances in meter
-		$distances = array();
-		$distances["Berlin"] = array();
-		$distances["Berlin"]["Potsdam"] = 27185;
-		$distances["Berlin"]["Hamburg"] = 255518;
-		$distances["Berlin"]["Dresden"] = 164954;
-		$distances["Berlin"]["Cape Town"] = 9624137;
-		$distances["Berlin"]["New York City"] = 6385266;
-		$distances["Berlin"]["Sydney"] = 16092238;
-		
-		$distances["Potsdam"] = array();
-		$distances["Potsdam"]["Hamburg"] = 242231;
-		$distances["Potsdam"]["Dresden"] = 156823;
-		$distances["Potsdam"]["Cape Town"] =9612288;
-		$distances["Potsdam"]["New York City"] = 6370104;
-		$distances["Potsdam"]["Sydney"] = 16118486;
-		
-		$distances["Hamburg"] = array();
-		$distances["Hamburg"]["Dresden"] = 377003;
-		$distances["Hamburg"]["Cape Town"] = 9760489;
-		$distances["Hamburg"]["New York City"] = 6129909;
-		$distances["Hamburg"]["Sydney"] = 16275543;
-		
-		$distances["Dresden"] = array();
-		$distances["Dresden"]["Cape Town"] = 9459562;
-		$distances["Dresden"]["New York City"] = 6478589;
-		$distances["Dresden"]["Sydney"] = 16109156;
-		
-		$distances["Cape Town"] = array();
-		$distances["Cape Town"]["New York City"] = 12564111;
-		$distances["Cape Town"]["Sydney"] = 11013398;
-		
-		$distances["New York City"] = array();
-		$distances["New York City"]["Sydney"] = 15988687;
-		
-		$this->assertTrue(self::$_database->exec("BEGIN"));
-		$sql  = "INSERT INTO ". $table ." (name, center) VALUES(:name, GeomFromText(:center, 32632))";
-		$sqlStatement = self::$_database->prepare($sql);
-		foreach ($values as $value){
-			$sqlStatement->clear();
-			$this->assertEquals(3, count($value));
-			$this->assertTrue($sqlStatement->bindValue(":name", $value[0]));
-			$this->assertTrue($sqlStatement->bindValue(":center", "POINT(". $value[1] ." ". $value[2] .")"));
-			$this->assertInstanceOf("SQLite3Result", $sqlStatement->execute());
-		}
-		$this->assertTrue(self::$_database->exec("COMMIT"));
-		
-		# check the inserts
-		$sql  = "SELECT id, name, X(center), Y(center) FROM ". $table ." WHERE name=:name";
-		$sqlStatement = self::$_database->prepare($sql);
-		foreach ($values as $value){
-			$sqlStatement->clear();
-			$this->assertEquals(3, count($value));
-			$this->assertTrue($sqlStatement->bindValue(":name", $value[0]));
-			$result = $sqlStatement->execute();
-			$this->assertInstanceOf("SQLite3Result", $result);
-			while($row = $result->fetchArray()){
-				$this->assertGreaterThan(4, count($row));
-				$this->assertGreaterThan(-1, $row[0]);
-				$this->assertEquals($value[0], $row[1]);
-				$this->assertEquals($value[1], $row[2]);
-				$this->assertEquals($value[2], $row[3]);
-			}
-		}
-
-		# calculate the distances
-		# Calling Distance() with three parameters, which returns distance in Meter
-		$sql  = "SELECT t1.name, t2.name, Distance(t1.center, t2.center) As distance";
-		$sql .= "  FROM ". $table ." AS t1, ". $table ." AS t2";
-		$sql .= "  WHERE t1.name=:from AND t2.name=:to";
-		$sqlStatement = self::$_database->prepare($sql);
-		foreach(array_keys($distances) as $start){
-			foreach(array_keys($distances[$start]) as $end){
-				$sqlStatement->clear();
-				# Calculate distance from start --> end
-				$this->assertTrue($sqlStatement->bindValue(":from", $start));
-				$this->assertTrue($sqlStatement->bindValue(":to", $end));
-				$result = $sqlStatement->execute();
-				$this->assertInstanceOf("SQLite3Result", $result);
-				while($row = $result->fetchArray()){
-					$this->assertGreaterThan(3, count($row));
-					$this->assertEquals($start, $row[0]);
-					$this->assertEquals($end, $row[1]);
-					$this->assertEquals($distances[$start][$end], $row[2], $start ." --> ". $end);
-				}
-			}
-		}
-	}
-
-	protected static $_databaseFile;
-	protected static $_database;
-}
-?>
Index: src/webservice/tests/TestStations.php
===================================================================
--- src/webservice/tests/TestStations.php	(revision 8f38d1eb0d2e82eb85c37617864c60c37bfebf83)
+++ 	(revision )
@@ -1,66 +1,0 @@
-<?php
-/*
-    Copyright (C) 2015 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-    MA 02110-1301  USA.
-*/
-
-class TestStations extends PHPUnit_Framework_TestCase
-{
-	protected $config;
-
-    protected function setUp()
-    {
-		$file = "webtests/webservice/testconfig/testconfig.php";
-		$this->assertFileExists($file);
-		require($file);
-		$this->config = $testconfig; 
-		$this->assertNotNull($this->config);
-    }
-
-	public function testEmptyStations()
-	{
-		$this->queryEmptyStationList($this->config["webserviceUrl"]);
-	}
-	
-	public function testStationRewrite()
-	{
-		$this->queryEmptyStationList($this->config["webserviceUrlRewrite"]);
-	}
-	
-	protected function queryEmptyStationList($url){
-		$this->assertInternalType('string', $url ."/");
-		$client = new GuzzleHttp\Client
-		(
-			[
-				"base_uri" => $url,
-				"timeout" => 2.0,
-			]
-		);
-		$response = $client->get("index.php/stations");
-		$this->assertNotNull($response);
-		$this->assertEquals($response->getStatusCode(), 200);
-		$this->assertEquals($response->getReasonPhrase(), "OK");
-
-		$body = $response->getBody();
-		$this->assertTrue(!empty($body));
-		$stations = json_decode($body);
-		$this->assertNotNull($stations);
-		$this->assertInternalType("array", $stations);
-		$this->assertEquals(count($stations), 0);
-	}
-}
-?>
