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;
     }
 }
Example #3
0
 /**
  * Initializes connection settings
  */
 public function __construct($project = null, $url = null, $devkey = null, $testPlan = null, $build = null)
 {
     //Initialize Testlink credentials
     if (isset($url)) {
         Mage_Testlink_Connector::$SERVER_URL = $url;
     }
     Mage_Testlink_Connector::$devKey = $devkey;
     $this->_project = $project;
     $this->_testPlan = $testPlan;
     $this->_build = $build;
     if (isset($devkey) && isset($project) && $devkey != "null" && $project != "null" && $devkey != "false" && $project != "false") {
         $this->instantiateObservers();
     }
 }
Example #4
0
 /**
  * @covers Mage_Testlink_Annotation::endTest
  */
 public function testEndTest()
 {
     $this->_testCaseMock->expects($this->never())->method('getAnnotations');
     $this->_connectorMock->expects($this->never())->method('report');
     $this->assertNull($this->_annotationMock->endTest());
 }