source: src/webapp/webservice/tests/ServiceTest.php@ 86442cb

0.5 debian/bullseye debian/jessie
Last change on this file since 86442cb was 86442cb, checked in by Joachim Langenbach <joachim.langenbach@…>, 9 years ago

Added Nmea0183 Parsers to the PHP webservice to allow the user to load a logfile into the map
(loading the logfile and display it on the map is not implemented yet)

  • Property mode set to 100644
File size: 1.7 KB
Line 
1<?php
2/*
3 Copyright (C) 2017 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19// enable in php 7
20// declare(Strict_types=1);
21
22/**
23 * @brief Covers index.php tests
24 */
25final class ServiceTest extends PHPUnit_Framework_TestCase
26{
27 public function testData()
28 {
29 $webservice = new GnuBoat\Webservice();
30 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
31 $_POST["request"] = "data";
32 $webservice->process();
33 }
34
35 public function testLogFiles()
36 {
37 $webservice = new GnuBoat\Webservice();
38 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
39 $_POST["request"] = "logfiles";
40 $webservice->process();
41 }
42
43 public function testShutdown()
44 {
45 $webservice = new GnuBoat\Webservice();
46 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
47 $_POST["request"] = "shutdown";
48 $webservice->process();
49 }
50
51 public function testMap()
52 {
53 $webservice = new GnuBoat\Webservice();
54 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
55 $_POST["request"] = "map";
56 $webservice->process();
57 }
58}
59
60?>
Note: See TracBrowser for help on using the repository browser.