public function testGetProjectContextWithEventDispatcher() { $dispatcher = new EventDispatcher(); $this->puli->setEventDispatcher($dispatcher); $this->puli->setRootDirectory($this->tempRoot); $this->puli->start(); $context = $this->puli->getContext(); $this->assertSame($dispatcher, $context->getEventDispatcher()); }
public function testGetProjectEnvironmentWithEventDispatcher() { $dispatcher = new EventDispatcher(); $this->puli->setEventDispatcher($dispatcher); $this->puli->setRootDirectory($this->tempDir); $this->puli->start(); $environment = $this->puli->getEnvironment(); $this->assertSame($dispatcher, $environment->getEventDispatcher()); }