Example #1
0
 /**
  * @covers Mage_Testlink_Connector::getBuild
  *
  * @dataProvider getBuildDataProvider
  */
 public function testGetBuild($build)
 {
     $b = $this->_connector->getProject($build);
     if (is_numeric($build)) {
         $this->assertEquals($b, $build);
     } else {
         $this->assertNull($b);
     }
 }
Example #2
0
 /**
  * Constructs Annotation
  *
  * @param Mage_Testlink_Listener $listener
  */
 public function __construct(Mage_Testlink_Listener $listener)
 {
     $this->setListener($listener);
     $project = $listener->getProject();
     if (isset($project)) {
         $this->setTestlink(new Mage_Testlink_Connector());
         $projectId = $this->_testlink->getProject($project);
         $testPlan = $listener->getTestPlan();
         $this->setTestplan($this->_testlink->getTestPlan($projectId, $testPlan));
         $testPlanId = isset($this->_testplan['id']) ? $this->_testplan['id'] : null;
         $this->setBuild($this->_testlink->getBuild($testPlanId, $listener->getBuild()));
     } else {
         return;
     }
 }