Errors in tests for Nette\Tester

Notice: This thread is very old.
grogy
Member | 147
+
0
-

Hi,

I'm running tests on the project and libraries. After update Nette\Tester to 0.9.2 I have fail tests for Nette\Tester. Example:

-- FAILED: /www/doc/.../project/libs/nette/tester/tests/Exit.code.exception.phpt | tester/tests/Exit.code.exception.phpt
   Exception:

   in tester/tests/Exit.code.exception.phpt(10)

Machine have configuration:

  • Linux, Ubuntu, 2.6.32–45-generic-pae
  • PHP 5.3.24

I don't know why failed tests.

David Grudl
Nette Core | 8205
+
0
-

Could you copy&paste whole output?

grogy
Member | 147
+
0
-

Yes, of course.

sssss........F.F...............FF.....F....F......F......

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.exception.phpt | tester/tests/Exit.code.exception.phpt
   Exception:

   in tester/tests/Exit.code.exception.phpt(10)

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.exception.pure.phpt | tester/tests/Exit.code.exception.pure.phpt
   Fatal error: Uncaught exception 'Exception' in /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.exception.pure.phpt:11
   Stack trace:
   #0 {main}
     thrown in /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.exception.pure.phpt on line 11

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.fatalError.pure.phpt | tester/tests/Exit.code.fatalError.pure.phpt
   Fatal error: Unsupported operand types in /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.fatalError.pure.phpt on line 11

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.fatalError.phpt | tester/tests/Exit.code.fatalError.phpt
   Fatal error: Unsupported operand types in /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.fatalError.phpt on line 10

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.die.phpt | tester/tests/Exit.code.die.phpt
   Fatal error (code 231)

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.dieAnotherDay.phpt | tester/tests/Exit.code.dieAnotherDay.phpt
   Fatal error (code 231)

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.notice.phpt | tester/tests/Exit.code.notice.phpt
   ErrorException: Undefined variable: a

   in tester/tests/Exit.code.notice.phpt(10)


FAILURES! (52 tests, 7 failures, 5 skipped, 0.5 seconds)
David Grudl
Nette Core | 8205
+
0
-

Whole output, with header.

Milo
Nette Core | 1283
+
0
-

@grogy Do you have any own error handler in autoprepend file (or somehow added)? There is a notice converted to ErrorException:

-- FAILED: /www/doc/path-to-project/libs/nette/tester/tests/Exit.code.notice.phpt | tester/tests/Exit.code.notice.phpt
   ErrorException: Undefined variable: a

I tried the tests on a pure compiled PHP 5.3.24 on Debian and result is success.

Last edited by Milo (2013-07-22 09:58)

grogy
Member | 147
+
0
-

Sorry,

my fault. It working OK.

Milo
Nette Core | 1283
+
0
-

And what was wrong? Somebody else can be curious…

grogy
Member | 147
+
0
-

Milo wrote:

My fault: I have custom runner on server (runner used Tester 0.9.0 and the runner tested phpt files of Tester with version 0.9.2)