source: src/webapp/webservice/tests/ServiceTest.php@ 172e90d

0.5 debian/bullseye debian/jessie
Last change on this file since 172e90d was c455d7b, checked in by Joachim Langenbach <joachim.langenbach@…>, 9 years ago
  • Webservice now leverages PHP classes and autoloader functionality. All webservice tasks are combined in index.php and served by Webservice.php
  • Webclient lists available log files and webservice provides them to download
  • Property mode set to 100644
File size: 1.8 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 /**
28 * @runInSeparateProcess
29 */
30 public function testData()
31 {
32 $webservice = new GnuBoat\Webservice();
33 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
34 $_POST["request"] = "data";
35 $webservice->process();
36 }
37
38 /**
39 * @runInSeparateProcess
40 */
41 public function testLogFiles()
42 {
43 $webservice = new GnuBoat\Webservice();
44 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
45 $_POST["request"] = "logfiles";
46 $webservice->process();
47 }
48
49 /**
50 * @runInSeparateProcess
51 */
52 public function testShutdown()
53 {
54 $webservice = new GnuBoat\Webservice();
55 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
56 $_POST["request"] = "shutdown";
57 $webservice->process();
58 }
59
60 /**
61 * @runInSeparateProcess
62 */
63 public function testMap()
64 {
65 $webservice = new GnuBoat\Webservice();
66 $this->assertInstanceOf(GnuBoat\Webservice::class, $webservice);
67 $_POST["request"] = "map";
68 $webservice->process();
69 }
70}
71
72?>
Note: See TracBrowser for help on using the repository browser.