示例#1
0
 public function testActivatePluginsInProjectEnvironment()
 {
     $this->puli->setRootDirectory($this->tempDir);
     $this->puli->start();
     $this->assertSame($this->puli, TestPlugin::getPuli());
     $this->assertSame($this->puli->getEnvironment(), TestPlugin::getEnvironment());
 }
示例#2
0
 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());
 }
示例#3
0
 public function activate(Puli $puli)
 {
     self::$puli = $puli;
     // Test that Puli is started and the services are accessible
     self::$environment = $puli->getEnvironment();
 }