예제 #1
0
 /**
  * @covers Phansible\Renderer\VarfileRenderer::addMultipleVars
  */
 public function testShouldAddMultipleVars()
 {
     $vars = ['region' => 'brazil', 'os' => 'debian'];
     $this->model->addMultipleVars($vars);
     $expected = ['variables' => Yaml::dump($vars), 'name' => 'common'];
     $this->assertEquals($expected, $this->model->getData());
 }
예제 #2
0
 /**
  * @covers Phansible\Renderer\VarfileRenderer::renderFile
  */
 public function testShouldRenderVarfile()
 {
     $twig = $this->getMockBuilder('Twig_Environment')->disableOriginalConstructor()->setMethods(array('render'))->getMock();
     $twig->expects($this->once())->method('render')->with($this->equalTo('vars.yml.twig'), $this->model->getData());
     $result = $this->model->renderFile($twig);
 }