Gittern\Desiccator\TreeDesiccatorTest::testCantDesiccateTreeWithoutAllRelationsPersisted PHP Méthode

testCantDesiccateTreeWithoutAllRelationsPersisted() public méthode

    public function testCantDesiccateTreeWithoutAllRelationsPersisted()
    {
        $desiccator = new TreeDesiccator();
        $tree = M::mock('Gittern\\Entity\\GitObject\\Tree');
        $node_mock = M::mock('Gittern\\Entity\\GitObject\\Node\\TreeNode', array('getOctalModeString' => '040000', 'getName' => 'abacus'));
        $node_mock->shouldReceive('getRelatedObject')->andReturn($node_mock);
        $node_mock->shouldReceive('getSha')->andReturn(null);
        $tree->shouldReceive('getNodes')->andReturn(array($node_mock));
        $desiccator->desiccate($tree);
    }