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

shouldCreateFile() public method

public shouldCreateFile ( )
    public function shouldCreateFile()
    {
        $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' => null, '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'));
    }