Skip to content

Commit

Permalink
[BUGFIX] Fix broken unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoBlack committed Apr 13, 2016
1 parent 4438e1c commit 6f93a01
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Tests/Unit/Commands/ReviewCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class ReviewCommandTest extends BaseCommandTestCase
public function showTestDataProvider()
{
return array(
'review:show 12345' => array('12345'),
'review:show http://review.typo3.org/#/c/12345/' => array('http://review.typo3.org/#/c/12345/'),
'review:show https://review.typo3.org/#/c/12345/' => array('https://review.typo3.org/#/c/12345/'),
'review:show http://review.typo3.org/#/c/12345/1' => array('http://review.typo3.org/#/c/12345/1'),
'review:show https://review.typo3.org/#/c/12345/1' => array('https://review.typo3.org/#/c/12345/1'),
'review:show 47640' => array('47640'),
'review:show http://review.typo3.org/#/c/47640/' => array('http://review.typo3.org/#/c/47640/'),
'review:show https://review.typo3.org/#/c/47640/' => array('https://review.typo3.org/#/c/47640/'),
'review:show http://review.typo3.org/#/c/47640/1' => array('http://review.typo3.org/#/c/47640/1'),
'review:show https://review.typo3.org/#/c/47640/1' => array('https://review.typo3.org/#/c/47640/1'),
);
}

Expand Down Expand Up @@ -160,7 +160,7 @@ public function processShowReturnsCorrectOutputForValidRefIds($refId)
$attachments = $result->getAttachments();
/** @var Message\Attachment $attachment */
foreach ($attachments as $attachment) {
static::assertEquals('[BUGFIX] Log route values if a route can\'t be resolved', $attachment->getTitle());
static::assertEquals('[BUGFIX] Prevent fatal error when uploading file with invalid filename', $attachment->getTitle());
}
}

Expand All @@ -171,14 +171,14 @@ public function processShowReturnsCorrectOutputForMultipleValidRefIds()
{
$this->initCommandWithPayload(ReviewCommand::class, [
'user' => 'U54321',
'text' => 'review:show 12345 23456',
'text' => 'review:show 47640 23456',
]);
/** @var Message $result */
$result = $this->command->process();
$expectedString = '*[BUGFIX] Cast autoload and classAliasMap to Array* '
.'<https://review.typo3.org/23456|Review #23456 now>'.chr(10);
$expectedString .= '*[BUGFIX] Log route values if a route can\'t be resolved* '
.'<https://review.typo3.org/12345|Review #12345 now>';
$expectedString = '*[BUGFIX] Prevent fatal error when uploading file with invalid filename* '
.'<https://review.typo3.org/47640|Review #47640 now>'.chr(10);
$expectedString .= '*[BUGFIX] Cast autoload and classAliasMap to Array* '
.'<https://review.typo3.org/23456|Review #23456 now>';
static::assertEquals($expectedString, $result);
}

Expand Down Expand Up @@ -330,7 +330,7 @@ public function processShowWithProjectPhasesReturnsCorrectPretext($projectPhase,

$this->initCommandWithPayload(ReviewCommand::class, [
'user' => 'U54321',
'text' => 'review:show 12345',
'text' => 'review:show 47640',
]);
/** @var Message $result */
$result = $this->command->process();
Expand Down

0 comments on commit 6f93a01

Please sign in to comment.