Completed
Push — master ( 93a702...008e2c )
by Alexander
03:47
created

TestEndedEvent::getTestResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of the phpunit-mink library.
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @copyright Alexander Obuhovich <[email protected]>
8
 * @link      https://github.com/aik099/phpunit-mink
9
 */
10
11
namespace aik099\PHPUnit\Event;
12
13
14
use aik099\PHPUnit\BrowserTestCase;
15
use Behat\Mink\Session;
16
17
class TestEndedEvent extends TestEvent
18
{
19
20
	/**
21
	 * Test result.
22
	 *
23
	 * @var \PHPUnit_Framework_TestResult
24
	 */
25
	private $_testResult;
26
27
	/**
28
	 * Remembers the exception which caused test to fail.
29
	 *
30
	 * @param BrowserTestCase               $test_case   Test case.
31
	 * @param \PHPUnit_Framework_TestResult $test_result Test result.
32
	 * @param Session                       $session     Session.
33
	 */
34 14
	public function __construct(
35
		BrowserTestCase $test_case,
36
		\PHPUnit_Framework_TestResult $test_result,
37
		Session $session = null
38
	) {
39 14
		parent::__construct($test_case, $session);
40 14
		$this->_testResult = $test_result;
41 14
	}
42
43
	/**
44
	 * Returns test result.
45
	 *
46
	 * @return \PHPUnit_Framework_TestResult
47
	 */
48 5
	public function getTestResult()
49
	{
50 5
		return $this->_testResult;
51
	}
52
53
}
54