Completed
Push — master ( 016764...50d24f )
by judicael
04:08
created
bundles/src/Batch/app/Controller/Phpunit.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -6,42 +6,42 @@
 block discarded – undo
6 6
 
7 7
 class Phpunit extends Controller
8 8
 {
9
-    /**
10
-     * Constructs a test case with the given name.
11
-     *
12
-     */
13
-    public function __construct()
14
-    {
15
-        parent::__construct();
16
-    }
17
-
18
-    /**
19
-     * new method to launch a web server
20
-     * @param array $options
21
-     * @tutorial php bin/console server:run
22
-     *           php bin/console server:run -a 192.168.0.1:8000
23
-     */
24
-    public function phpunit(array $options = array())
25
-    {
26
-        ob_get_clean();
27
-
28
-        $files = scandir(__DIR__.'/../../../../tests');
29
-
30
-        foreach ($files as $one) {
31
-
32
-            if (is_dir(__DIR__.'/../../../../tests/'.$one) && $one != '..' && $one != '.') {
33
-
34
-                $controllerFiles = scandir(__DIR__.'/../../../../tests'.'/'.$one.'/app/Controller');
35
-
36
-                foreach ($controllerFiles as $oneController) {
37
-
38
-                    if (is_file(__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController) && $oneController != '..' && $oneController != '.') {
39
-
40
-                        $unitTest = new \PHPUnit_TextUI_Command;
41
-                        $unitTest->run([__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController]);
42
-                    }
43
-                }
44
-            }
45
-        }
46
-    }
9
+	/**
10
+	 * Constructs a test case with the given name.
11
+	 *
12
+	 */
13
+	public function __construct()
14
+	{
15
+		parent::__construct();
16
+	}
17
+
18
+	/**
19
+	 * new method to launch a web server
20
+	 * @param array $options
21
+	 * @tutorial php bin/console server:run
22
+	 *           php bin/console server:run -a 192.168.0.1:8000
23
+	 */
24
+	public function phpunit(array $options = array())
25
+	{
26
+		ob_get_clean();
27
+
28
+		$files = scandir(__DIR__.'/../../../../tests');
29
+
30
+		foreach ($files as $one) {
31
+
32
+			if (is_dir(__DIR__.'/../../../../tests/'.$one) && $one != '..' && $one != '.') {
33
+
34
+				$controllerFiles = scandir(__DIR__.'/../../../../tests'.'/'.$one.'/app/Controller');
35
+
36
+				foreach ($controllerFiles as $oneController) {
37
+
38
+					if (is_file(__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController) && $oneController != '..' && $oneController != '.') {
39
+
40
+						$unitTest = new \PHPUnit_TextUI_Command;
41
+						$unitTest->run([__DIR__.'/../../../../tests/'.$one.'/app/Controller/' . $oneController]);
42
+					}
43
+				}
44
+			}
45
+		}
46
+	}
47 47
 }
Please login to merge, or discard this patch.
bundles/src/Batch/app/Controller/Server.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -7,68 +7,68 @@
 block discarded – undo
7 7
 
8 8
 class Server extends Controller
9 9
 {
10
-    /**
11
-     * new method to launch a web server
12
-     * @param array $options
13
-     * @tutorial php bin/console server:run
14
-     *           php bin/console server:run -a 192.168.0.1:8000
15
-     */
16
-    public function run(array $options = array())
17
-    {
18
-        ob_get_clean();
10
+	/**
11
+	 * new method to launch a web server
12
+	 * @param array $options
13
+	 * @tutorial php bin/console server:run
14
+	 *           php bin/console server:run -a 192.168.0.1:8000
15
+	 */
16
+	public function run(array $options = array())
17
+	{
18
+		ob_get_clean();
19 19
 
20
-        if (!isset($options['a'])) {
21
-            $options['a'] = 'localhost:8000';
22
-        }
20
+		if (!isset($options['a'])) {
21
+			$options['a'] = 'localhost:8000';
22
+		}
23 23
 
24
-        echo "\n\n";
25
-        echo Bash::setBackground("                                                                            ", 'green');
26
-        echo Bash::setBackground("          [OK] Start web server                                             ", 'green');
27
-        echo Bash::setBackground("                                                                            ", 'green');
28
-        echo "\n\n";
29
-        echo "        > Use ".$options['a']." in browser";
30
-        echo "\n\n";
31
-        echo "        > Clic Ctrl+C to stop the web server";
32
-        echo "\n\n";
24
+		echo "\n\n";
25
+		echo Bash::setBackground("                                                                            ", 'green');
26
+		echo Bash::setBackground("          [OK] Start web server                                             ", 'green');
27
+		echo Bash::setBackground("                                                                            ", 'green');
28
+		echo "\n\n";
29
+		echo "        > Use ".$options['a']." in browser";
30
+		echo "\n\n";
31
+		echo "        > Clic Ctrl+C to stop the web server";
32
+		echo "\n\n";
33 33
 
34
-        exec('php -S '.$options['a'].' /public/index.php');
35
-    }
34
+		exec('php -S '.$options['a'].' /public/index.php');
35
+	}
36 36
 
37
-    /**
38
-     * check if a server web is launched
39
-     * @param array $options
40
-     * @tutorial php bin/console server:status
41
-     *           php bin/console server:status -a 192.168.0.1:8000
42
-     */
43
-    public function status(array $options = array())
44
-    {
45
-        ob_get_clean();
37
+	/**
38
+	 * check if a server web is launched
39
+	 * @param array $options
40
+	 * @tutorial php bin/console server:status
41
+	 *           php bin/console server:status -a 192.168.0.1:8000
42
+	 */
43
+	public function status(array $options = array())
44
+	{
45
+		ob_get_clean();
46 46
 
47
-        if (!isset($options['a'])) {
48
-            $options['a'] = 'localhost:8000';
49
-        }
47
+		if (!isset($options['a'])) {
48
+			$options['a'] = 'localhost:8000';
49
+		}
50 50
 
51
-        list($hostname, $port) = explode(':', $options['a']);
51
+		list($hostname, $port) = explode(':', $options['a']);
52 52
 
53
-        if (false !== $fp = @fsockopen($hostname, $port, $errno, $errstr, 1)) {
54
-            fclose($fp);
53
+		if (false !== $fp = @fsockopen($hostname, $port, $errno, $errstr, 1)) {
54
+			fclose($fp);
55 55
 
56
-            echo "\n\n";
57
-            echo Bash::setBackground("                                                                            ", 'green');
58
-            echo Bash::setBackground("          [OK] A web server is launched                                     ", 'green');
59
-            echo Bash::setBackground("                                                                            ", 'green');
60
-            echo "\n\n";
61
-            echo "        > Check realized on ".$options['a'];
62
-            echo "\n\n";
63
-        }
64
-        else {
65
-            echo "\n\n";
66
-            echo Bash::setBackground("                                                                            ", 'red');
67
-            echo Bash::setBackground("          [WARNING] A web server is not used                                ", 'red');
68
-            echo Bash::setBackground("                                                                            ", 'red');
69
-            echo "\n\n";
70
-            echo "        > Check realized on ".$options['a'];
71
-            echo "\n\n";
72
-        }
73
-    }
56
+			echo "\n\n";
57
+			echo Bash::setBackground("                                                                            ", 'green');
58
+			echo Bash::setBackground("          [OK] A web server is launched                                     ", 'green');
59
+			echo Bash::setBackground("                                                                            ", 'green');
60
+			echo "\n\n";
61
+			echo "        > Check realized on ".$options['a'];
62
+			echo "\n\n";
63
+		}
64
+		else {
65
+			echo "\n\n";
66
+			echo Bash::setBackground("                                                                            ", 'red');
67
+			echo Bash::setBackground("          [WARNING] A web server is not used                                ", 'red');
68
+			echo Bash::setBackground("                                                                            ", 'red');
69
+			echo "\n\n";
70
+			echo "        > Check realized on ".$options['a'];
71
+			echo "\n\n";
72
+		}
73
+	}
74 74
 }
Please login to merge, or discard this patch.