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

shouldCreateFileWithEncoding() public method

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