public function testGetEntityManager()
 {
     $rs = new Tx_Extbase_Reflection_Service();
     $factory = $this->getMock('Tx_Extbase_Persistence_Mapper_DataMapFactory', array(), array(), '', false);
     $manager = new Tx_Doctrine2_Manager();
     $manager->injectReflectionService($rs);
     $manager->injectDataMapFactory($factory);
     $em = $manager->getEntityManager();
     $this->assertInstanceOf('Doctrine\\ORM\\EntityManager', $em);
 }
 public function setUp()
 {
     parent::setUp();
     $manager = new Tx_Doctrine2_Manager();
     $manager->setEntityManager($this->entityManager);
     $factory = new Tx_Doctrine2_QueryFactory();
     $factory->injectManager($manager);
     $this->repository = new Tx_TestApp_Domain_Repository_PersonRepository(null);
     $this->repository->setEntityManager($this->entityManager);
     $this->repository->injectQueryFactory($factory);
 }
 public static function getDevMode()
 {
     if (self::$devMode === null) {
         self::$devMode = t3lib_div::cmpIP(t3lib_div::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask']);
     }
     return self::$devMode;
 }
 */
spl_autoload_register(function ($class) {
    if (strpos($class, 'Tx_Extbase') === 0) {
        $class = str_replace('Tx_Extbase_', '', $class);
        $dir = __DIR__ . '/../vendor/extbase/Classes';
    } else {
        if (strpos($class, 'Tx_Doctrine2_Tests') === 0) {
            $class = str_replace('Tx_Doctrine2_Tests_', '', $class);
            $dir = __DIR__;
        } else {
            if (strpos($class, 'Tx_Doctrine2') === 0) {
                $class = str_replace('Tx_Doctrine2_', '', $class);
                $dir = __DIR__ . '/../Classes';
            }
        }
    }
    if (isset($class) && isset($dir)) {
        require $dir . '/' . str_replace("_", "/", $class) . '.php';
    }
});
Tx_Doctrine2_Manager::setDevMode(true);
// "Mocking" TYPO3
define('PATH_site', __DIR__);
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = 'extbase';
define('TYPO3_db', 'doctrine');
define('TYPO3_db_host', 'localhost');
define('TYPO3_db_username', 'root');
define('TYPO3_db_password', '');
interface t3lib_singleton
{
}