mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-24 12:15:23 +00:00
26 lines
569 B
PHP
26 lines
569 B
PHP
|
<?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'));
|
||
|
}
|
||
|
|
||
|
}
|