Changeset 35226
- Timestamp:
- 10/16/2015 09:14:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/includes/speed-trap-listener.php
r35214 r35226 5 5 * results directly to the console. 6 6 */ 7 class SpeedTrapListener implements \PHPUnit_Framework_TestListener7 class SpeedTrapListener implements PHPUnit_Framework_TestListener 8 8 { 9 9 /** … … 52 52 * An error occurred. 53 53 * 54 * @param \PHPUnit_Framework_Test $test55 * @param \Exception $e56 * @param float $time 57 */ 58 public function addError( \PHPUnit_Framework_Test $test, \Exception $e, $time)54 * @param PHPUnit_Framework_Test $test 55 * @param Exception $e 56 * @param float $time 57 */ 58 public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) 59 59 { 60 60 } … … 63 63 * A failure occurred. 64 64 * 65 * @param \PHPUnit_Framework_Test $test66 * @param \PHPUnit_Framework_AssertionFailedError $e65 * @param PHPUnit_Framework_Test $test 66 * @param PHPUnit_Framework_AssertionFailedError $e 67 67 * @param float $time 68 68 */ 69 public function addFailure( \PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)69 public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) 70 70 { 71 71 } … … 74 74 * Incomplete test. 75 75 * 76 * @param \PHPUnit_Framework_Test $test77 * @param \Exception $e78 * @param float $time 79 */ 80 public function addIncompleteTest( \PHPUnit_Framework_Test $test, \Exception $e, $time)76 * @param PHPUnit_Framework_Test $test 77 * @param Exception $e 78 * @param float $time 79 */ 80 public function addIncompleteTest(PHPUnit_Framework_Test $test, Exception $e, $time) 81 81 { 82 82 } … … 85 85 * Risky test. 86 86 * 87 * @param \PHPUnit_Framework_Test $test88 * @param \Exception $e87 * @param PHPUnit_Framework_Test $test 88 * @param Exception $e 89 89 * @param float $time 90 90 * @since Method available since Release 4.0.0 91 91 */ 92 public function addRiskyTest( \PHPUnit_Framework_Test $test, \Exception $e, $time)92 public function addRiskyTest(PHPUnit_Framework_Test $test, Exception $e, $time) 93 93 { 94 94 } … … 97 97 * Skipped test. 98 98 * 99 * @param \PHPUnit_Framework_Test $test100 * @param \Exception $e101 * @param float $time 102 */ 103 public function addSkippedTest( \PHPUnit_Framework_Test $test, \Exception $e, $time)99 * @param PHPUnit_Framework_Test $test 100 * @param Exception $e 101 * @param float $time 102 */ 103 public function addSkippedTest(PHPUnit_Framework_Test $test, Exception $e, $time) 104 104 { 105 105 } … … 108 108 * A test started. 109 109 * 110 * @param \PHPUnit_Framework_Test $test111 */ 112 public function startTest( \PHPUnit_Framework_Test $test)110 * @param PHPUnit_Framework_Test $test 111 */ 112 public function startTest(PHPUnit_Framework_Test $test) 113 113 { 114 114 } … … 117 117 * A test ended. 118 118 * 119 * @param \PHPUnit_Framework_Test $test120 * @param float $time 121 */ 122 public function endTest( \PHPUnit_Framework_Test $test, $time)123 { 124 if (!$test instanceof \PHPUnit_Framework_TestCase) return;119 * @param PHPUnit_Framework_Test $test 120 * @param float $time 121 */ 122 public function endTest(PHPUnit_Framework_Test $test, $time) 123 { 124 if (!$test instanceof PHPUnit_Framework_TestCase) return; 125 125 126 126 $time = $this->toMilliseconds($time); … … 135 135 * A test suite started. 136 136 * 137 * @param \PHPUnit_Framework_TestSuite $suite138 */ 139 public function startTestSuite( \PHPUnit_Framework_TestSuite $suite)137 * @param PHPUnit_Framework_TestSuite $suite 138 */ 139 public function startTestSuite(PHPUnit_Framework_TestSuite $suite) 140 140 { 141 141 $this->suites++; … … 145 145 * A test suite ended. 146 146 * 147 * @param \PHPUnit_Framework_TestSuite $suite148 */ 149 public function endTestSuite( \PHPUnit_Framework_TestSuite $suite)147 * @param PHPUnit_Framework_TestSuite $suite 148 */ 149 public function endTestSuite(PHPUnit_Framework_TestSuite $suite) 150 150 { 151 151 $this->suites--; … … 175 175 * Stores a test as slow. 176 176 * 177 * @param \PHPUnit_Framework_TestCase $test177 * @param PHPUnit_Framework_TestCase $test 178 178 * @param int $time Test execution time in milliseconds 179 179 */ 180 protected function addSlowTest( \PHPUnit_Framework_TestCase $test, $time)180 protected function addSlowTest(PHPUnit_Framework_TestCase $test, $time) 181 181 { 182 182 $label = $this->makeLabel($test); … … 209 209 * Label for describing a test. 210 210 * 211 * @param \PHPUnit_Framework_TestCase $test211 * @param PHPUnit_Framework_TestCase $test 212 212 * @return string 213 213 */ 214 protected function makeLabel( \PHPUnit_Framework_TestCase $test)214 protected function makeLabel(PHPUnit_Framework_TestCase $test) 215 215 { 216 216 return sprintf('%s:%s', get_class($test), $test->getName()); … … 299 299 * 300 300 * <code> 301 * \@slowThreshold 5000301 * @slowThreshold 5000 302 302 * public function testLongRunningProcess() {} 303 303 * </code> 304 304 * 305 * @param \PHPUnit_Framework_TestCase $test305 * @param PHPUnit_Framework_TestCase $test 306 306 * @return int 307 307 */ 308 protected function getSlowThreshold( \PHPUnit_Framework_TestCase $test)308 protected function getSlowThreshold(PHPUnit_Framework_TestCase $test) 309 309 { 310 310 $ann = $test->getAnnotations();
Note: See TracChangeset
for help on using the changeset viewer.