Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
"class": "GrumPHP\\Composer\\GrumPHPPlugin"
},
"autoload": {
"psr-0": {
"GrumPHP\\": "src/"
"psr-4": {
"GrumPHP\\": "src"
}
},
"autoload-dev": {
"psr-0": {
"GrumPHPTest\\": "test/src/"
"psr-4": {
"GrumPHPTest\\": "test"
}
},
"bin": ["bin/grumphp"]
Expand Down
5 changes: 5 additions & 0 deletions phpspec.yml
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
suites:
default:
namespace: GrumPHP
psr4_prefix: GrumPHP

formatter.name: pretty
9 changes: 3 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
<phpunit bootstrap="./test/src/Bootstrap.php" colors="true">
<phpunit bootstrap="test/Bootstrap.php" colors="true">
<testsuites>
<testsuite name="Linters">
<directory>./test/src/GrumPHPTest/Linter</directory>
<directory>test/Linter</directory>
</testsuite>
<testsuite name="Parsers">
<directory>./test/src/GrumPHPTest/Parser</directory>
</testsuite>
<testsuite name="Util">
<directory>./test/src/GrumPHPTest/Util</directory>
<directory>test/Parser</directory>
</testsuite>
</testsuites>
</phpunit>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function it_runs_the_suite_but_fails_when_file_doesnt_exists(GrumPHP $grumPHP, G

function it_runs_the_suite(GrumPHP $grumPHP, GitCommitMsgContext $context)
{
$filename = dirname(dirname(dirname(__DIR__))) . '/test/fixtures/clover_coverage/60-percent-coverage.xml';
$filename = dirname(dirname(__DIR__)) . '/test/fixtures/clover_coverage/60-percent-coverage.xml';
$grumPHP->getTaskConfiguration('clover_coverage')->willReturn([
'clover_file' => $filename,
'level' => 50,
Expand All @@ -78,7 +78,7 @@ function it_runs_the_suite(GrumPHP $grumPHP, GitCommitMsgContext $context)

function it_runs_the_suite_but_not_reaching_coverage(GrumPHP $grumPHP, GitCommitMsgContext $context)
{
$filename = dirname(dirname(dirname(__DIR__))) . '/test/fixtures/clover_coverage/60-percent-coverage.xml';
$filename = dirname(dirname(__DIR__)) . '/test/fixtures/clover_coverage/60-percent-coverage.xml';
$grumPHP->getTaskConfiguration('clover_coverage')->willReturn([
'clover_file' => $filename,
'level' => 100,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static function buildFromConfiguration($path)
);

// Load basic service file + custom user configuration
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../../resources/config'));
$loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../../resources/config'));
$loader->load('formatter.yml');
$loader->load('linters.yml');
$loader->load('parameters.yml');
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(
*/
public function getGrumPHPPath()
{
$path = __DIR__ . '/../../../../';
$path = __DIR__ . '/../../..';

return $this->getRelativePath($path);
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions test/src/Bootstrap.php → test/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace GrumPHPTest;

error_reporting(E_ALL | E_STRICT);
define('PROJECT_BASE_PATH', __DIR__ . '/../..');
define('TEST_BASE_PATH', __DIR__ . '/..');
define('PROJECT_BASE_PATH', __DIR__ . '/..');
define('TEST_BASE_PATH', __DIR__);

$autoloadFile = PROJECT_BASE_PATH . '/vendor/autoload.php';
if (!file_exists($autoloadFile)) {
throw new \RuntimeException('Install dependencies to run test suite.');
}

$autoLoader = require $autoloadFile;
require_once $autoloadFile;