示例#1
0
 public function testFactoryCreatesBuildWithDefaults()
 {
     $node = Node::factory($this->jenkins, new JsonData(array()));
     $this->assertEquals(array(), $node->assignedLabels);
     $this->assertEquals("", $node->description);
     $this->assertEquals(array(), $node->jobs);
     $this->assertEquals("UNKNOWN", $node->mode);
     $this->assertEquals("", $node->nodeName);
     $this->assertEquals("", $node->nodeDescription);
     $this->assertEquals(0, $node->numExecutors);
     $this->assertEquals(array(), $node->overallLoad);
     $this->assertNull($node->primaryView);
     $this->assertFalse($node->quietingDown);
     $this->assertEquals("0", $node->slaveAgentPort);
     $this->assertEquals(array(), $node->unlabeledLoad);
     $this->assertFalse($node->useCrumbs);
     $this->assertFalse($node->useSecurity);
     $this->assertEquals(array(), $node->views);
 }
示例#2
0
 /**
  * Returns information on this server node
  *
  * @return \mogman1\Jenkins\Node
  */
 public function getNodeInfo()
 {
     return Node::factory($this, $this->get("/")->getJson());
 }