@@ -60,7 +60,7 @@ protected function runJUnit(RunTestService $service): ResponseInterface
6060 $ suitesXml = $ suites ->outputMemory ();
6161
6262 // Duration: pick your source (internal timer is fine)
63- $ inst = TestDiscovery::getUnitaryInst ();
63+ $ inst = TestDiscovery::getUnitaryInst (true );
6464 $ xml = new \XMLWriter ();
6565 $ xml ->openMemory ();
6666 $ xml ->setIndent (true );
@@ -91,29 +91,27 @@ protected function runJUnit(RunTestService $service): ResponseInterface
9191 */
9292 protected function buildFooter (): void
9393 {
94- $ inst = TestDiscovery::getUnitaryInst ();
95- if ($ inst !== null ) {
96- $ dot = $ this ->command ->getAnsi ()->middot ();
97- $ this ->command ->message ($ this ->command ->getAnsi ()->line (80 ));
98- $ this ->command ->message (
99- $ this ->command ->getAnsi ()->style (
100- ["bold " , $ inst ::isSuccessful () ? "green " : "red " ],
101- "\nTests: " . $ inst ::getTotalTests () . " $ dot " .
102- "Failures: " . $ inst ::getTotalFailed () . " $ dot " .
103- "Errors: " . $ inst ::getTotalErrors () . " $ dot " .
104- "Skipped: " . $ inst ::getTotalSkipped () . " \n"
105- )
106- );
107- $ this ->command ->message (
108- $ this ->command ->getAnsi ()->style (
109- ["italic " , "grey " ],
110- "Duration: " . Helpers::formatDuration ($ inst ::getTotalDuration ()) . " seconds $ dot " .
111- "Memory: " . Helpers::byteToMegabyte ($ inst ::getTotalMemory ()) . " MB $ dot " .
112- "Date: " . Clock::value ("now " )->iso () . "\n"
113- )
114- );
115- $ this ->command ->message ($ this ->command ->getAnsi ()->line (80 ));
116- $ this ->command ->message ("" );
117- }
94+ $ inst = TestDiscovery::getUnitaryInst (true );
95+ $ dot = $ this ->command ->getAnsi ()->middot ();
96+ $ this ->command ->message ($ this ->command ->getAnsi ()->line (80 ));
97+ $ this ->command ->message (
98+ $ this ->command ->getAnsi ()->style (
99+ ["bold " , $ inst ::isSuccessful () ? "green " : "red " ],
100+ "\nTests: " . $ inst ::getTotalTests () . " $ dot " .
101+ "Failures: " . $ inst ::getTotalFailed () . " $ dot " .
102+ "Errors: " . $ inst ::getTotalErrors () . " $ dot " .
103+ "Skipped: " . $ inst ::getTotalSkipped () . " \n"
104+ )
105+ );
106+ $ this ->command ->message (
107+ $ this ->command ->getAnsi ()->style (
108+ ["italic " , "grey " ],
109+ "Duration: " . Helpers::formatDuration ($ inst ::getTotalDuration ()) . " seconds $ dot " .
110+ "Memory: " . Helpers::byteToMegabyte ($ inst ::getTotalMemory ()) . " MB $ dot " .
111+ "Date: " . Clock::value ("now " )->iso () . "\n"
112+ )
113+ );
114+ $ this ->command ->message ($ this ->command ->getAnsi ()->line (80 ));
115+ $ this ->command ->message ("" );
118116 }
119117}
0 commit comments