Gitlab\Tests\Api\RepositoriesTest::shouldUpdateFile PHP Method

shouldUpdateFile() public method

public shouldUpdateFile ( )
    public function shouldUpdateFile()
    {
        $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' => null, 'content' => 'some new contents', 'commit_message' => 'Updated new file'))->will($this->returnValue($expectedArray));
        $this->assertEquals($expectedArray, $api->updateFile(1, 'dir/file1.txt', 'some new contents', 'master', 'Updated new file'));
    }