Skip to content

Commit d2b4b06

Browse files
author
Alexandre Salomé
committed
Merge pull request #15 from lyrixx/feat-admin-logger
Feat admin logger
2 parents a5bcfd3 + 15120a4 commit d2b4b06

15 files changed

+17
-16
lines changed

src/Gitonomy/Git/Admin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
namespace Gitonomy\Git;
1414

15+
use Psr\Log\LoggerInterface;
1516
use Symfony\Component\Process\ProcessBuilder;
1617

1718
/**
@@ -31,7 +32,7 @@ class Admin
3132
*
3233
* @throws RuntimeException Directory exists or not writable
3334
*/
34-
public static function init($path, $bare = true)
35+
public static function init($path, $bare = true, LoggerInterface $logger = null)
3536
{
3637
$builder = ProcessBuilder::create(array('git', 'init', '-q'));
3738

@@ -48,6 +49,6 @@ public static function init($path, $bare = true)
4849
throw new \RuntimeException(sprintf('Error while initializing repository: %s', $process->getErrorOutput()));
4950
}
5051

51-
return new Repository($path);
52+
return new Repository($path, null, $logger);
5253
}
5354
}

tests/Gitonomy/Git/Tests/AbtractTest.php renamed to tests/Gitonomy/Git/Tests/AbstractTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Gitonomy\Git\Admin;
1616
use Gitonomy\Git\Repository;
1717

18-
abstract class AbtractTest extends \PHPUnit_Framework_TestCase
18+
abstract class AbstractTest extends \PHPUnit_Framework_TestCase
1919
{
2020
private static $libRepo;
2121
private static $testRepo;

tests/Gitonomy/Git/Tests/AdminTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Gitonomy\Git\Admin;
1616

17-
class AdminTest extends AbtractTest
17+
class AdminTest extends AbstractTest
1818
{
1919
private $tmpDir;
2020

tests/Gitonomy/Git/Tests/BlameTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
namespace Gitonomy\Git\Tests;
1414

15-
class BlameTest extends AbtractTest
15+
class BlameTest extends AbstractTest
1616
{
1717
public function testBlame()
1818
{

tests/Gitonomy/Git/Tests/BlobTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Gitonomy\Git\Blob;
1616

17-
class BlobTest extends AbtractTest
17+
class BlobTest extends AbstractTest
1818
{
1919
public function testGetContent()
2020
{

tests/Gitonomy/Git/Tests/CommitTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Gitonomy\Git\Commit;
1616
use Gitonomy\Git\Diff;
1717

18-
class CommitTest extends AbtractTest
18+
class CommitTest extends AbstractTest
1919
{
2020
public function testGetDiff()
2121
{

tests/Gitonomy/Git/Tests/DiffTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Gitonomy\Git\Diff;
1616

17-
class DiffTest extends AbtractTest
17+
class DiffTest extends AbstractTest
1818
{
1919
public function testGetRevisions()
2020
{

tests/Gitonomy/Git/Tests/HooksTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Gitonomy\Git\Admin;
1616

17-
class HooksTest extends AbtractTest
17+
class HooksTest extends AbstractTest
1818
{
1919
private $tmpDir;
2020
private $hooksDir;

tests/Gitonomy/Git/Tests/LogTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Gitonomy\Git\Log;
1616

17-
class LogTest extends AbtractTest
17+
class LogTest extends AbstractTest
1818
{
1919
public function testRevisionAndPath()
2020
{

tests/Gitonomy/Git/Tests/PushReferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Gitonomy\Git\PushReference;
1616

17-
class PushReferenceTest extends AbtractTest
17+
class PushReferenceTest extends AbstractTest
1818
{
1919
const CREATE = 1;
2020
const DELETE = 2;

0 commit comments

Comments
 (0)