This repository has been archived by the owner on Sep 28, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
RoboFile.php
50 lines (47 loc) · 1.99 KB
/
RoboFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
////////////////////////////////////////////////////////////////////////////////
// __________ __ ________ __________
// \______ \ |__ ______ / _____/ ____ _____ ______\______ \ _______ ___
// | ___/ | \\____ \/ \ ____/ __ \\__ \\_ __ \ | _// _ \ \/ /
// | | | Y \ |_> > \_\ \ ___/ / __ \| | \/ | ( <_> > <
// |____| |___| / __/ \______ /\___ >____ /__| |______ /\____/__/\_ \
// \/|__| \/ \/ \/ \/ \/
// -----------------------------------------------------------------------------
// Designed and Developed by Brad Jones <brad @="bjc.id.au" />
// -----------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
class RoboFile extends Robo\Tasks
{
/**
* Property: serverPort
* =========================================================================
* The port the built in PHP server will run on for our acceptance testing.
*/
public static $serverPort = 8000;
/**
* Method: test
* =========================================================================
* This will run our unit / acceptance testing. All the *gears* within
* the **PhpGearBox** utlise PhpUnit as the basis for our testing with the
* addition of the built in PHP Web Server, making the acceptance tests
* almost as portable as standard unit tests.
*
* Just run: ```php ./vendor/bin/robo test```
*
* Parameters:
* -------------------------------------------------------------------------
* n/a
*
* Returns:
* -------------------------------------------------------------------------
* void
*/
public function test()
{
$this->taskServer(self::$serverPort)
->dir('./tests/environment')
->background(true)
->run();
exit($this->taskPHPUnit()->bootstrap('./tests/bootstrap.php')->arg('./tests')->run()->getExitCode());
}
}