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

Notice: This thread is very old.
bauer01
Member | 30
+
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)

David Grudl
Nette Core | 8082
+
0
-

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