Differential D13222 Diff 32160 src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/parser/__tests__/DifferentialHunkParserTestCase.php
<?php | <?php | ||||
final class DifferentialHunkParserTestCase extends PhabricatorTestCase { | final class DifferentialHunkParserTestCase extends PhabricatorTestCase { | ||||
private function createComment() { | private function createComment() { | ||||
$comment = new DifferentialInlineComment(); | $comment = new DifferentialInlineComment(); | ||||
return $comment; | return $comment; | ||||
} | } | ||||
private function createHunk( | private function createHunk( | ||||
$old_offset, | $old_offset, | ||||
$old_len, | $old_len, | ||||
$new_offset, | $new_offset, | ||||
$new_len, | $new_len, | ||||
$changes) { | $changes) { | ||||
$hunk = id(new DifferentialModernHunk()) | $hunk = id(new DifferentialHunk()) | ||||
->setOldOffset($old_offset) | ->setOldOffset($old_offset) | ||||
->setOldLen($old_len) | ->setOldLen($old_len) | ||||
->setNewOffset($new_offset) | ->setNewOffset($new_offset) | ||||
->setNewLen($new_len) | ->setNewLen($new_len) | ||||
->setChanges($changes); | ->setChanges($changes); | ||||
return $hunk; | return $hunk; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 266 Lines • Show Last 20 Lines |