public function setUp() { parent::setUp(); $this->locationGateway = $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Location\\Gateway'); $this->locationMapper = $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Location\\Mapper'); $this->treeHandler = $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\TreeHandler', array(), array(), '', false); }
/** * Sets up the test suite. */ public function setUp() { parent::setUp(); $handler = $this->getDatabaseHandler(); $schema = __DIR__ . '/../../../../../_fixtures/schema/schema.' . $this->db . '.sql'; $queries = array_filter(preg_split('(;\\s*$)m', file_get_contents($schema))); foreach ($queries as $query) { $handler->exec($query); } }
/** * Only set up once for these read only tests on a large fixture * * Skipping the reset-up, since setting up for these tests takes quite some * time, which is not required to spent, since we are only reading from the * database anyways. * * @return void */ public function setUp() { if ( !self::$setUp ) { self::$container = $this->getContainer(); $this->handler = self::$container->get( "ezpublish.api.storage_engine.legacy.dbhandler" ); $this->db = $this->handler->getName(); parent::setUp(); $this->insertDatabaseFixture( __DIR__ . '/../../../Core/Repository/Tests/Service/Integration/Legacy/_fixtures/clean_ezdemo_47_dump.php' ); self::$setUp = $this->handler; } else { $this->handler = self::$setUp; } }
/** * Inserts DB fixture. */ public function setUp() { parent::setUp(); $this->insertDatabaseFixture(__DIR__ . '/../../_fixtures/roles.php'); }