include(Hamcrest_Matcher.php): failed to open stream: No such file or directory

66 views
Skip to first unread message

neylorsousa

unread,
Mar 27, 2012, 9:08:29 PM3/27/12
to Phake-Users
Hello,

I installed the Phake by PEAR and I have get the error in the title.
How to solve?

I'm user the SO Ubuntu 11.10 and phpunit 3.6.10 (stable)

Thanks.

Mike Lively

unread,
Mar 28, 2012, 3:56:03 PM3/28/12
to phake...@googlegroups.com

It sounds like you may be attempting to use the ham crest matchers without including hamcrest.php first.

Do you have code to reproduce and maybe a file name and line number that this error occurs on?

You can get more info on hamcrest (an optional dependency) from https://github.com/cordoval/hamcrest-php

- Mike Lively

neylorsousa

unread,
Mar 29, 2012, 8:30:14 PM3/29/12
to Phake-Users
Sorry for the delay in responding,

The file name to reproduce this error is Phake/Matchers/Factory.php in
line 77, see below:

elseif (interface_exists('Hamcrest_Matcher')
&& $argument instanceof Hamcrest_Matcher)
{
return new Phake_Matchers_HamcrestMatcherAdapter($argument);
}

I managed to solve installing with pear the hamcrest and how I am
using the Yii framework, put in the bootstrap file require_once of
hamcrast / Hamcrast.php.

Could you install the dependency with the Hamcrast Phake, avoiding
problems?

Thanks Mike!

On 28 mar, 16:56, Mike Lively <mjlivel...@gmail.com> wrote:
> It sounds like you may be attempting to use the ham crest matchers without
> including hamcrest.php first.
>
> Do you have code to reproduce and maybe a file name and line number that
> this error occurs on?
>
> You can get more info on hamcrest (an optional dependency)
> fromhttps://github.com/cordoval/hamcrest-php
Reply all
Reply to author
Forward
0 new messages