public function testActivatePluginsInProjectEnvironment() { $this->puli->setRootDirectory($this->tempDir); $this->puli->start(); $this->assertSame($this->puli, TestPlugin::getPuli()); $this->assertSame($this->puli->getEnvironment(), TestPlugin::getEnvironment()); }
public function testGetProjectContextInProdEnvironment() { $this->puli->setRootDirectory($this->tempRoot); $this->puli->setEnvironment(Environment::PROD); $this->puli->start(); $context = $this->puli->getContext(); $this->assertSame(Environment::PROD, $context->getEnvironment()); $this->assertSame(Environment::PROD, $this->puli->getEnvironment()); }
public function activate(Puli $puli) { self::$puli = $puli; // Test that Puli is started and the services are accessible self::$environment = $puli->getEnvironment(); }