diff options
Diffstat (limited to 'library/kzykhys/git/test/PHPGit/Command/ConfigCommandTest.php')
-rw-r--r-- | library/kzykhys/git/test/PHPGit/Command/ConfigCommandTest.php | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/library/kzykhys/git/test/PHPGit/Command/ConfigCommandTest.php b/library/kzykhys/git/test/PHPGit/Command/ConfigCommandTest.php deleted file mode 100644 index fba2fbf76..000000000 --- a/library/kzykhys/git/test/PHPGit/Command/ConfigCommandTest.php +++ /dev/null @@ -1,55 +0,0 @@ -<?php - -use PHPGit\Git; - -require_once __DIR__ . '/../BaseTestCase.php'; - -class ConfigCommandTest extends BaseTestCase -{ - - public function testConfigSetAndList() - { - $git = new Git(); - $git->init($this->directory); - $git->setRepository($this->directory); - - $before = $git->config(); - - $git->config->set('user.name', 'John Doe'); - - $config = $git->config(); - $this->assertArrayHasKey('user.name', $config); - - $expected = 'John Doe'; - - if (isset($before['user.name'])) { - $expected = $before['user.name'] . "\n" . $expected; - } - - $this->assertEquals($expected, $config['user.name']); - } - - public function testConfigAdd() - { - $git = new Git(); - $git->init($this->directory); - $git->setRepository($this->directory); - - $before = $git->config(); - - $git->config->set('user.name', 'John Doe'); - $git->config->add('user.name', 'Foo'); - - $config = $git->config(); - $this->assertArrayHasKey('user.name', $config); - - $expected = "John Doe\nFoo"; - - if (isset($before['user.name'])) { - $expected = $before['user.name'] . "\n" . $expected; - } - - $this->assertEquals($expected, $config['user.name']); - } - -}
\ No newline at end of file |