File: WrongCall.phpt

package info (click to toggle)
php-phpspec-prophecy-phpunit 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 208 kB
  • sloc: php: 197; makefile: 17
file content (27 lines) | stat: -rw-r--r-- 521 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--TEST--
A test fails due to calling an unexisting method on a mock 
--FILE--
<?php

require_once __DIR__ . '/run_test.php';

\Prophecy\PhpUnit\Tests\runTest('WrongCall');
--EXPECTF--
PHPUnit %s

Runtime: %s

E %s 1 / 1 (100%)

Time: %a

There was 1 error:

1) Prophecy\PhpUnit\Tests\Fixtures\WrongCall::testMethod
Prophecy\Exception\Doubler\MethodNotFoundException: Method `Double\stdClass\P1::talk()` is not defined.

%a%s/fixtures/WrongCall.php:%d
%s/tests/run_test.php:%d

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.