Skip to content

Commit

Permalink
Adjust tests for truncation
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed Jul 11, 2017
1 parent b43b8bc commit b1b0559
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/TestCase/Model/Table/IncidentsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ public function testCreateIncidentFromBugReport()
$bugReport['errors'][] = $bugReport['errors'][0];
}
$result = $this->Incidents->createIncidentFromBugReport($bugReport);

$this->assertEquals(true, in_array(false, $result['incidents']));

$this->assertEquals(40, count($result['incidents']));
// No new report added (closest report found)
$this->assertEquals(0, count($result['reports']));

// Case 3.2: Long JS report submission
$bugReport = file_get_contents(TESTS . 'Fixture' . DS . 'report_js.json');
Expand All @@ -396,9 +396,9 @@ public function testCreateIncidentFromBugReport()
$bugReport['exception']['stack'][] = $bugReport['exception']['stack'][0];
}
$result = $this->Incidents->createIncidentFromBugReport($bugReport);

$this->assertEquals(true, in_array(false, $result['incidents']));

$this->assertEquals(1, count($result['incidents']));
// No new report added (closest report found)
$this->assertEquals(0, count($result['reports']));

// Case 3.3: Long error_message in PHP report submission
$bugReport = file_get_contents(TESTS . 'Fixture' . DS . 'report_php.json');
Expand Down

0 comments on commit b1b0559

Please sign in to comment.