- $this->assertGreaterThan(550, $score, 'data/report.json and rendered report differ too much. Try $this->assertEquals($expectedReport, $actualReport) to see a diff.');
* Provides actions and descritions for testWhenRepositoryPerAction
*
* See https://developer.github.com/v3/activity/events/types/#issuecommentevent
*/
public function payloadDescriptionProvider () {
return [
['created', "baxterthehacker added a comment to issue #2 — Spelling error in the README file: You are totally right! I'll get this fixed right away."],
['edited', "baxterthehacker edited a comment to issue #2 — Spelling error in the README file: You are totally right! I'll get this fixed right away."],
['deleted', "baxterthehacker deleted a comment to issue #2 — Spelling error in the README file"],
$this->assertSame("Lorem ipsum dolor", PushEvent::getCommitTitle("Lorem ipsum dolor"));
$longCommitMessages = [
"I was born in a water moon. Some people, especially its inhabitants, called it a planet, but as it was only a little over two hundred kilometres in diameter, 'moon' seems the more accurate term. The moon was made entirely of water, by which I mean it was a globe that not only had no land, but no rock either, a sphere with no solid core at all, just liquid water, all the way down to the very centre of the globe.",
"I was born in a water moon. Some people, especially its inhabitants, called it a planet, but as it was only a little over two hundred kilometres in diameter, 'moon' seems the more accurate term. The moon was made entirely of water, by which I mean it was a globe that not only had no land, but no rock either, a sphere with no solid core at all, just liquid water, all the way down to the very centre of the globe.\n\nIf it had been much bigger the moon would have had a core of ice, for water, though supposedly incompressible, is not entirely so, and will change under extremes of pressure to become ice. (If you are used to living on a planet where ice floats on the surface of water, this seems odd and even wrong, but nevertheless it is the case.) The moon was not quite of a size for an ice core to form, and therefore one could, if one was sufficiently hardy, and adequately proof against the water pressure, make one's way down, through the increasing weight of water above, to the very centre of the moon.",
];
$shortCommitTitle = "I was born in a water moon. Some people, especially its inhabitants, ca…";
foreach ($longCommitMessages as $longCommitMessage) {
$this->assertSame(
$shortCommitTitle,
PushEvent::getCommitTitle($longCommitMessage)
);
}
}
public function testWhenTheCommitterAndAuthorAreDifferent () {