Gittern\Gaufrette\GitternCommitishReadOnlyAdapterTest::testCanReadFile PHP Метод

testCanReadFile() публичный Метод

public testCanReadFile ( )
    public function testCanReadFile()
    {
        $foo_mock = M::mock('Gittern\\Entity\\GitObject\\Tree');
        $this->tree_mock->shouldReceive('getNodeNamed')->with('foo')->andReturn($this->tree_mock);
        $this->tree_mock->shouldReceive('getRelatedObject')->andReturn($foo_mock);
        $blob_mock = M::mock('Gittern\\Entity\\GitObject\\Blob');
        $foo_mock->shouldReceive('getNodeNamed')->with('bar')->andReturn($foo_mock);
        $foo_mock->shouldReceive('getRelatedObject')->andReturn($blob_mock);
        $blob_mock->shouldReceive('getContents')->andReturn('Foobar');
        $this->assertEquals('Foobar', $this->adapter->read('foo/bar'));
    }