Sonata\tests\CustomerBundle\Entity\CustomerManagerTest::getCustomerManager PHP Method

getCustomerManager() protected method

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