set() public method

public set ( string $name, boolean | integer | string | array $value )
$name string
$value boolean | integer | string | array
 protected function setUp()
 {
     $this->console = new Application();
     $this->_input = $this->getMock('Symfony\\Component\\Console\\Input\\InputInterface');
     $this->_output = $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface');
     $this->_server = $this->getMockBuilder('Deployer\\Server\\ServerInterface')->disableOriginalConstructor()->getMock();
     $this->_env = new Environment();
     $this->_env->set("local_path", __DIR__ . '/../fixture/app');
     $this->_env->set("remote_path", "/home/www");
     $this->deployer = new Deployer($this->console, $this->_input, $this->_output);
     Context::push(new Context($this->_server, $this->_env, $this->_input, $this->_output));
 }
Beispiel #2
0
 public function testByStageName()
 {
     $servers = new ServerCollection();
     $servers['one'] = new \stdClass();
     $environments = new EnvironmentCollection();
     $environments['one'] = $env = new Environment();
     $env->set('stages', ['prod']);
     $stage = new StageStrategy($servers, $environments);
     $this->assertEquals(['one' => $servers['one']], $stage->getServers('prod'));
 }
Beispiel #3
0
 /**
  * Indicate stage
  *
  * @param string|array $stages  Name or array on server stages.
  *
  * @return Builder
  */
 public function stage($stages)
 {
     $this->env->set('stages', (array) $stages);
     return $this;
 }