eZ\Publish\Core\SignalSlot\Tests\RepositoryTest::testAggregation PHP Method

testAggregation() public method

public testAggregation ( $method, $parameters, $return )
    public function testAggregation($method, $parameters, $return)
    {
        $innerRepository = $this->getMockBuilder('eZ\\Publish\\Core\\Repository\\Repository')->disableOriginalConstructor()->getMock();
        $innerRepository->expects($this->once())->method($method)->will($this->returnValueMap(array(array_merge($parameters, array($return)))));
        $repository = new Repository($innerRepository, $this->getMock('eZ\\Publish\\Core\\SignalSlot\\SignalDispatcher'));
        $result = call_user_func_array(array($repository, $method), $parameters);
        $this->assertTrue($result === $return);
    }