Skip to content

Commit

Permalink
Fix CS/WS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 13, 2018
1 parent caa9726 commit fc14572
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/Framework/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1640,8 +1640,8 @@ protected function getMockForAbstractClass($originalClassName, array $arguments
protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = [], $callOriginalConstructor = true, array $options = [])
{
if ($originalClassName === '') {
$fileName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), PATHINFO_FILENAME);
$originalClassName = preg_replace('/[^a-zA-Z0-9_]/', '', $fileName);
$fileName = \pathinfo(\basename(\parse_url($wsdlFile)['path']), PATHINFO_FILENAME);
$originalClassName = \preg_replace('/[^a-zA-Z0-9_]/', '', $fileName);
}

if (!\class_exists($originalClassName)) {
Expand Down
25 changes: 13 additions & 12 deletions src/Util/Log/TeamCity.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public function addError(Test $test, \Exception $e, $time)
$this->printEvent(
'testFailed',
[
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
Expand All @@ -93,9 +93,9 @@ public function addWarning(Test $test, Warning $e, $time)
$this->printEvent(
'testFailed',
[
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
Expand All @@ -111,9 +111,9 @@ public function addWarning(Test $test, Warning $e, $time)
public function addFailure(Test $test, AssertionFailedError $e, $time)
{
$parameters = [
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $test->getName(),
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
];

Expand Down Expand Up @@ -192,9 +192,9 @@ public function printIgnoredTest($testName, \Exception $e, $time)
$this->printEvent(
'testIgnored',
[
'name' => $testName,
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'name' => $testName,
'message' => self::getMessage($e),
'details' => self::getDetails($e),
'duration' => self::toMilliseconds($time),
]
);
Expand Down Expand Up @@ -427,6 +427,7 @@ private static function getFileName($className)

/**
* @param float $time microseconds
*
* @return int
*/
private static function toMilliseconds($time)
Expand Down

0 comments on commit fc14572

Please sign in to comment.