예제 #1
0
 /**
  * Returns remote code coverage information, when enabled.
  *
  * @return array
  */
 public function getRemoteCodeCoverageInformation()
 {
     if ($this->_remoteCoverageScriptUrl) {
         return $this->remoteCoverageHelper->get($this->_remoteCoverageScriptUrl, $this->_testId);
     }
     return array();
 }
 /**
  * Test description.
  *
  * @return void
  */
 public function testValidCoverageIsReturned()
 {
     $fixture_folder = __DIR__ . '/../Fixture';
     $this->_remoteUrl->shouldReceive('getPageContent')->once()->andReturn(file_get_contents($fixture_folder . '/coverage_data.txt'));
     $content = $this->_remoteCoverageHelper->get('A', 'B');
     $class_source_file = realpath($fixture_folder . '/DummyClass.php');
     $expected = array(3 => 1, 6 => 1, 7 => -2, 11 => -1, 12 => -2, 14 => 1);
     $this->assertEquals($expected, $content[$class_source_file]);
 }