aboutsummaryrefslogtreecommitdiffstats
path: root/library/kzykhys/git/test/PHPGit/Command/ShowCommandTest.php
blob: 25b22fe4f6f4a7c3b8e5abbaa0d784633794476e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php

use PHPGit\Git;
use Symfony\Component\Filesystem\Filesystem;

require_once __DIR__ . '/../BaseTestCase.php';

class ShowCommandTest extends BaseTestCase
{

    public function testShow()
    {
        $filesystem = new Filesystem();

        $git = new Git();
        $git->init($this->directory);
        $git->setRepository($this->directory);

        $filesystem->dumpFile($this->directory . '/README.md', 'foobar');
        $git->add('README.md');
        $git->commit('Initial commit');

        $git->show('master', array('format' => 'oneline'));
    }

}