/**
  * Prepares the required <b>$argv</b> array.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->prepareArgv(array('install', PHPUC_TEST_DIR));
     $input = new phpucConsoleInput();
     $input->parse();
     $this->args = $input->args;
 }
 /**
  * Creates some sample logs and artifacts.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->createTestDirectories(array("/cruisecontrol/logs/{$this->projectName}", "/cruisecontrol/logs/{$this->projectName}/20071211211853", "/cruisecontrol/logs/{$this->projectName}/20071211220903", "/cruisecontrol/logs/{$this->projectName}/20071217180035", "/cruisecontrol/logs/{$this->projectName}/20080106030401", "/cruisecontrol/logs/{$this->projectName}/20080109182028", "/cruisecontrol/logs/{$this->projectName}/20080113145726", "/cruisecontrol/logs/{$this->projectName}/20080114115320", "/cruisecontrol/logs/{$this->projectName}/20080118220842", "/cruisecontrol/artifacts", "/cruisecontrol/artifacts/{$this->projectName}/20071211211853", "/cruisecontrol/artifacts/{$this->projectName}/20071211220903", "/cruisecontrol/artifacts/{$this->projectName}/20071217180035", "/cruisecontrol/artifacts/{$this->projectName}/20080106030401", "/cruisecontrol/artifacts/{$this->projectName}/20080109182028", "/cruisecontrol/artifacts/{$this->projectName}/20080113145726", "/cruisecontrol/artifacts/{$this->projectName}/20080114115320", "/cruisecontrol/artifacts/{$this->projectName}/20080118220842"));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20071211211853.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20071211211853.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20071211220903Lbuild.3.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20071211220903Lbuild.3.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20071217180035Lbuild.18.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20071217180035Lbuild.18.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20080106030401Lbuild.24.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20080106030401Lbuild.24.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20080109182028Lbuild.30.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20080109182028Lbuild.30.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20080113145726.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20080113145726.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20080114115320.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20080114115320.xml'));
     $this->createTestFile("/cruisecontrol/logs/{$this->projectName}/log20080118220842Lbuild.57.xml", file_get_contents(PHPUC_TEST_LOGS . '/log20080118220842Lbuild.57.xml'));
 }
 /**
  * Creates the used console args instance.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->args = $this->prepareConsoleArgs(array('delete', '--project-name', $this->projectName, PHPUC_TEST_DIR));
 }
Exemplo n.º 4
0
 /**
  * Start every test from an existing directory
  *
  * @return void
  */
 protected function tearDown()
 {
     chdir($this->cwd);
     parent::tearDown();
 }
 /**
  * Initializes a clean console args object and creates a project dummy.
  *
  * @return void
  */
 protected function setUp()
 {
     parent::setUp();
     $this->projectDir = PHPUC_TEST_DIR . '/projects/php-under-control';
     $options = array('example', '--pear-executables-dir', PHPUC_TEST_DIR . '/bin', '--project-name', $this->projectName);
     foreach ($this->options as $option) {
         $options[] = $option;
     }
     $options[] = PHPUC_TEST_DIR;
     $this->prepareArgv($options);
     $input = new phpucConsoleInput();
     $input->parse();
     $this->args = $input->args;
     $this->createTestDirectories(array('projects', "projects/{$this->projectName}"));
     $buildFile = new phpucBuildFile($this->projectDir . '/build.xml', $this->projectName);
     $buildFile->store();
 }