load->model('Group_model', 'groupModel'); } + public function t1() + { + return 't1'; + } + public function create_post () { $userInfo = Request::parse()->authData['userData']; EOT; $excepted = [ [ 'original' => [ 'name' => 'test.php', 'mode' => '100644', 'sha' => '0857f8b' ], 'modified' => [ 'name' => 'test.php', 'mode' => '100644', 'sha' => 'd6089d9' ], 'diff' => [ 'raw' => $raw, 'line' => [ '@@ -19,6 +19,11 @@ class Repository extends Base', " $this->load->model('Group_model', 'groupModel');", ' }', ' ', '+ public function t1()', '+ {', "+ return 't1';", '+ }', '+', ' public function create_post ()', ' {', " $userInfo = Request::parse()->authData['userData'];", ], 'additions' => 5, 'deletions' => 0, ], 'type' => 'text' ] ]; $actual = <<load->model('Group_model', 'groupModel'); } + public function t1() + { + return 't1'; + } + public function create_post () { $userInfo = Request::parse()->authData['userData']; EOT; $actual = Helper::parseDiffString($actual); $this->assertSame($excepted, $actual); } }