Sonata\tests\CustomerBundle\Entity\AddressManagerTest::getAddressManager PHP Method

getAddressManager() protected method

protected getAddressManager ( $qbCallback )
    protected function getAddressManager($qbCallback)
    {
        if (version_compare(\PHPUnit_Runner_Version::id(), '5.0.0', '>=')) {
            $this->markTestSkipped('Not compatible with PHPUnit 5.');
        }
        $em = EntityManagerMockFactory::create($this, $qbCallback, array('name', 'firstname'));
        $registry = $this->getMock('Doctrine\\Common\\Persistence\\ManagerRegistry');
        $registry->expects($this->any())->method('getManagerForClass')->will($this->returnValue($em));
        return new AddressManager('Sonata\\CustomerBundle\\Entity\\BaseAddress', $registry);
    }