| @@ 54-80 (lines=27) @@ | ||
| 51 | * @return PHPUnit_Framework_TestResult |
|
| 52 | * @throws Exception |
|
| 53 | */ |
|
| 54 | public function run(PHPUnit_Framework_TestResult $result = NULL) |
|
| 55 | { |
|
| 56 | $this->testId = get_class($this) . '__' . $this->getName(); |
|
| 57 | ||
| 58 | if ($result === NULL) { |
|
| 59 | $result = $this->createResult(); |
|
| 60 | } |
|
| 61 | ||
| 62 | $this->collectCodeCoverageInformation = $result->getCollectCodeCoverageInformation(); |
|
| 63 | ||
| 64 | parent::run($result); |
|
| 65 | ||
| 66 | if ($this->collectCodeCoverageInformation) { |
|
| 67 | $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage( |
|
| 68 | $this->coverageScriptUrl, |
|
| 69 | $this->testId |
|
| 70 | ); |
|
| 71 | $result->getCodeCoverage()->append( |
|
| 72 | $coverage->get(), $this |
|
| 73 | ); |
|
| 74 | } |
|
| 75 | ||
| 76 | // do not call this before to give the time to the Listeners to run |
|
| 77 | //$this->getStrategy()->endOfTest($this->session); |
|
| 78 | ||
| 79 | return $result; |
|
| 80 | } |
|
| 81 | ||
| 82 | public function setUp() |
|
| 83 | { |
|
| @@ 16-42 (lines=27) @@ | ||
| 13 | protected $collectCodeCoverageInformation; |
|
| 14 | protected $coverageScriptUrl; |
|
| 15 | ||
| 16 | public function run(PHPUnit_Framework_TestResult $result = NULL) |
|
| 17 | { |
|
| 18 | $this->testId = get_class($this) . '__' . $this->getName(); |
|
| 19 | ||
| 20 | if ($result === NULL) { |
|
| 21 | $result = $this->createResult(); |
|
| 22 | } |
|
| 23 | ||
| 24 | $this->collectCodeCoverageInformation = $result->getCollectCodeCoverageInformation(); |
|
| 25 | ||
| 26 | parent::run($result); |
|
| 27 | ||
| 28 | if ($this->collectCodeCoverageInformation) { |
|
| 29 | $coverage = new PHPUnit_Extensions_SeleniumCommon_RemoteCoverage( |
|
| 30 | $this->coverageScriptUrl, |
|
| 31 | $this->testId |
|
| 32 | ); |
|
| 33 | $result->getCodeCoverage()->append( |
|
| 34 | $coverage->get(), $this |
|
| 35 | ); |
|
| 36 | } |
|
| 37 | ||
| 38 | // do not call this before to give the time to the Listeners to run |
|
| 39 | //$this->getStrategy()->endOfTest($this->session); |
|
| 40 | ||
| 41 | return $result; |
|
| 42 | } |
|
| 43 | ||
| 44 | protected function request($file, $method = 'GET', $payload = '', $emptyPageOk = false) |
|
| 45 | { |
|