/**
  * 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]);
 }
Exemplo n.º 2
0
 /**
  * Test description.
  *
  * @return void
  */
 public function testGetPageContent()
 {
     $file = __DIR__ . '/../Fixture/coverage_data.txt';
     $remote_url = new RemoteUrl();
     $this->assertEquals(file_get_contents($file), $remote_url->getPageContent($file));
 }