Esempio n. 1
0
 /**
  * Setup a project for the engine and setup a build object from
  * project configuration. 
  *
  * @param Xinc::Core::Project::Project $project A project inside this engine.
  *
  * @return BuildInterface
  */
 public function setupBuild(Project $project)
 {
     $build = new Build($this, $project);
     $build->setLogger($this->log);
     $build->setNumber(1);
     $this->setupBuildProperties($build);
     $this->setupConfigProperties($build);
     $this->parseProjectConfig($build, $project->getConfigXml());
     return $build;
 }
Esempio n. 2
0
 public function testSetters()
 {
     $project = new Project();
     $name = 'test ' . rand(21213, 123213);
     $project->setName($name);
     $this->assertEquals($name, $project->getName(), 'Names should match');
     $status = ProjectStatus::MISCONFIGURED;
     $project->setStatus($status);
     $this->assertEquals($status, $project->getStatus(), 'Stati should match');
 }
Esempio n. 3
0
 /**
  * Constructor, generates an Exception Message.
  *
  * @param Xinc_Project $project
  * @param int          $buildTime
  */
 public function __construct(Project $project, $buildTime)
 {
     parent::__construct('Build  "' . $project->getName() . '" ' . 'with timestamp ' . $buildTime . ' was not found.');
 }
Esempio n. 4
0
 /**
  * Constructor, generates an Exception Message.
  *
  * @param Xinc_Project $project
  * @param int          $buildTime
  */
 public function __construct(Project $project, $buildTime)
 {
     parent::__construct('Build of "' . $project->getName() . '" ' . ' with timestamp: ' . $buildTime . ' could not be serialized.');
 }
Esempio n. 5
0
 public function __sleep()
 {
     /*
      * minimizing the storage for the project,
      * we just want the name
      */
     $project = new Project();
     $project->setName($this->getProject()->getName());
     $this->project = $project;
     return array('no', 'project', 'buildTimestamp', 'properties', 'status', 'lastBuild', 'labeler', 'engine', 'statistics', 'config', 'internalProperties');
 }