padraic/mockery — pull request #379 by vpassapera (2014-09-30 12:35:20+00:00)
Title: Fixes Object of class SplFileInfo could not be converted to boolean

When using mockery to mock a file like so:

```PHP
protected function setUp()
{
$fileMock = Mockery::mock((new Instantiator())->instantiate('Symfony\\Component\\Finder\\SplFileInfo'));
$fileMock
->shouldReceive('getBaseName')
->atLeast(1)
->andReturn('VirtualClass');

$stream = new TokenStream();
$stream->setCode(self::FILE_CONTENTS);

/** @var Source $source */
$source = (new Instantiator())->instantiate('TheDevNetwork\\CodeTools\\Model\\Source');
$source->setStream($stream);
$sourceMock = Mockery::mock($source);
$sourceMock
->shouldReceive('getFile')
->atLeast(1)
->andReturn($fileMock);

$this->objectHelper = new ObjectHelper($source);
}

```

An exception is thrown:
Object of class Symfony\Component\Finder\SplFileInfo could not be converted to boolean

This fixes it.