/** * @param Application $application * @param EventStore $store */ public function __construct(Application $application, EventStore $store) { $this->application = $application; $this->store = $store; $this->applyEvents($store->load()); }
function loadEvents() { file_put_contents($this->file, $this->getContent()); $events = $this->store->load(); $this->assert->equals($events, $this->getEvents()); }