public function setUp() { if (!isset($this->test_object_class)) { throw new Exception(get_class($this) . ' must set \\$object_test_class before calling ' . __METHOD__); } $this->setupMockServices(); $this->events = _elgg_services()->events; $this->events->backup(); $this->hooks = _elgg_services()->hooks; $this->hooks->backup(); $this->queue = new DatabaseQueueMock(); $this->entities = _elgg_services()->entityTable; $this->time = $this->entities->getCurrentTime()->getTimestamp(); $this->subscriptions = new SubscriptionsService(_elgg_services()->db); $this->session = _elgg_services()->session; $this->logger = _elgg_services()->logger; $this->logger->disable(); $this->translator = _elgg_services()->translator; $this->setupServices(); $this->actor = $this->mocks()->getUser(); }
public function setUp() { $this->setupMockServices(); $this->hooks = _elgg_services()->hooks; $this->hooks->backup(); }