public function shouldUpdateFileWithEncoding()
{
$expectedArray = array('file_name' => 'file1.txt', 'file_path' => 'dir/file1.txt');
$api = $this->getApiMock();
$api->expects($this->once())->method('put')->with('projects/1/repository/files', array('file_path' => 'dir/file1.txt', 'branch_name' => 'master', 'encoding' => 'base64', 'content' => 'some new contents', 'commit_message' => 'Updated file'))->will($this->returnValue($expectedArray));
$this->assertEquals($expectedArray, $api->updateFile(1, 'dir/file1.txt', 'some new contents', 'master', 'Updated file', 'base64'));
}