tester – how to print anything during the test in console output

6 years ago

bauer01
Member | 31
+
0
-

Hi,
why I can not send anything to the console output in my *.phpt file?

eg.

bootstrap.php

if (@!include __DIR__ . '/../vendor/autoload.php') {
    echo 'Install Nette Tester using `composer update --dev`';
    exit(1);
}

Tester\Environment::setup();

Test.phpt

use Tester\Assert;

require __DIR__ . '/../bootstrap.php';

echo "My output here?"; // It's not in output

Assert::true(true);

Command:
php vendor/nette/tester/Tester/tester -p /usr/bin/php tests

System
Debian 7
Nette Tester 1.0.0/master
PHP 5.4.4–14+deb7u7 (cli)

Last edited by bauer01 (2014-02-18 11:03)

6 years ago

David Grudl
Nette Core | 6864
+
0
-

It is written to the log file – but only when test fails. So try put exit(1) after echo.