updated-packages
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this source code in the file LICENSE.
|
||||
*/
|
||||
|
||||
namespace Gitonomy\Git\Tests;
|
||||
|
||||
use Gitonomy\Git\Admin;
|
||||
@@ -17,8 +18,9 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
abstract class AbstractTest extends TestCase
|
||||
{
|
||||
const REPOSITORY_URL = 'http://github.com/gitonomy/foobar.git';
|
||||
const REPOSITORY_URL = 'https://github.com/gitonomy/foobar.git';
|
||||
|
||||
const NO_MESSAGE_COMMIT = '011cd0c1625190d2959ee9a8f9f822006d94b661';
|
||||
const LONGFILE_COMMIT = '4f17752acc9b7c54ba679291bf24cb7d354f0f4f';
|
||||
const BEFORE_LONGFILE_COMMIT = 'e0ec50e2af75fa35485513f60b2e658e245227e9';
|
||||
const LONGMESSAGE_COMMIT = '3febd664b6886344a9b32d70657687ea4b1b4fab';
|
||||
@@ -51,10 +53,10 @@ abstract class AbstractTest extends TestCase
|
||||
*/
|
||||
public static function provideFoobar()
|
||||
{
|
||||
return array(
|
||||
array(self::createFoobarRepository()),
|
||||
array(self::createFoobarRepository(false)),
|
||||
);
|
||||
return [
|
||||
[self::createFoobarRepository()],
|
||||
[self::createFoobarRepository(false)],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,10 +64,10 @@ abstract class AbstractTest extends TestCase
|
||||
*/
|
||||
public static function provideEmpty()
|
||||
{
|
||||
return array(
|
||||
array(self::createEmptyRepository()),
|
||||
array(self::createEmptyRepository(false)),
|
||||
);
|
||||
return [
|
||||
[self::createEmptyRepository()],
|
||||
[self::createEmptyRepository(false)],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -93,7 +95,7 @@ abstract class AbstractTest extends TestCase
|
||||
} else {
|
||||
$dir = $repository->getGitDir();
|
||||
}
|
||||
AbstractTest::deleteDir($dir);
|
||||
self::deleteDir($dir);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -116,7 +118,7 @@ abstract class AbstractTest extends TestCase
|
||||
*
|
||||
* @param string $dir directory to delete
|
||||
*/
|
||||
public static function deleteDir($dir)
|
||||
protected static function deleteDir($dir)
|
||||
{
|
||||
$iterator = new \RecursiveDirectoryIterator($dir, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS);
|
||||
$iterator = new \RecursiveIteratorIterator($iterator, \RecursiveIteratorIterator::CHILD_FIRST);
|
||||
@@ -138,12 +140,12 @@ abstract class AbstractTest extends TestCase
|
||||
protected static function getOptions()
|
||||
{
|
||||
$command = isset($_SERVER['GIT_COMMAND']) ? $_SERVER['GIT_COMMAND'] : 'git';
|
||||
$envs = isset($_SERVER['GIT_ENVS']) ? (array) $_SERVER['GIT_ENVS'] : array();
|
||||
$envs = isset($_SERVER['GIT_ENVS']) ? (array) $_SERVER['GIT_ENVS'] : [];
|
||||
|
||||
return array(
|
||||
'command' => $command,
|
||||
return [
|
||||
'command' => $command,
|
||||
'environment_variables' => $envs,
|
||||
'process_timeout' => 60,
|
||||
);
|
||||
'process_timeout' => 60,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user