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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/fixtures export-ignore
/tests export-ignore
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
php-version: ['8.1', '8.2', '8.3']
php-version: ['8.2', '8.3']
name: 'PHPUnit'
steps:
- name: Checkout
Expand All @@ -22,15 +22,17 @@ jobs:
- name: Composer
uses: "ramsey/composer-install@v2"
- name: PHPUnit
run: vendor/bin/phpunit --coverage-clover=coverage.clover
run: php blackbox.php
env:
ENABLE_COVERAGE: 'true'
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
psalm:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1', '8.2', '8.3']
php-version: ['8.2', '8.3']
name: 'Psalm'
steps:
- name: Checkout
Expand All @@ -48,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.1']
php-version: ['8.2']
name: 'CS'
steps:
- name: Checkout
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/composer.lock
/vendor
/.phpunit.result.cache
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Requires PHP `~8.2`

### Fixed

- PHP `8.4` deprecations
Expand Down
28 changes: 28 additions & 0 deletions blackbox.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
declare(strict_types = 1);

require 'vendor/autoload.php';

use Innmind\BlackBox\{
Application,
PHPUnit\Load,
Runner\CodeCoverage,
};

Application::new($argv)
->disableMemoryLimit()
->when(
\getenv('ENABLE_COVERAGE') !== false,
static fn(Application $app) => $app
->codeCoverage(
CodeCoverage::of(
__DIR__.'/src/',
__DIR__.'/tests/',
)
->dumpTo('coverage.clover')
->enableWhen(true),
)
->scenariiPerProof(1),
)
->tryToProve(Load::directory(__DIR__.'/tests/'))
->exit();
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "~9.0",
"innmind/black-box": "^6.4.1",
"vimeo/psalm": "~5.6",
"innmind/coding-standard": "~2.0",
"symfony/var-dumper": "^6.2"
Expand Down
17 changes: 0 additions & 17 deletions phpunit.xml.dist

This file was deleted.

2 changes: 1 addition & 1 deletion tests/GraphTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Relation\Property,
};
use Innmind\Immutable\Set;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class GraphTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/LookupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Innmind\ObjectGraph\Lookup;
use Fixtures\Innmind\ObjectGraph\Foo;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class LookupTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Node/ClassNameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Tests\Innmind\ObjectGraph\Node;

use Innmind\ObjectGraph\Node\ClassName;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class ClassNameTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Node/ReferenceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Tests\Innmind\ObjectGraph\Node;

use Innmind\ObjectGraph\Node\Reference;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class ReferenceTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/NodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Relation\Property,
};
use Innmind\Immutable\Set;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class NodeTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Relation/PropertyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace Tests\Innmind\ObjectGraph\Relation;

use Innmind\ObjectGraph\Relation\Property;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class PropertyTest extends TestCase
{
Expand Down
8 changes: 4 additions & 4 deletions tests/RenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
};
use Innmind\Filesystem\File\Content;
use Fixtures\Innmind\ObjectGraph\Foo;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class RenderTest extends TestCase
{
Expand All @@ -34,7 +34,7 @@ public function testInvokation()
$dot = Render::of()($graph);

$this->assertInstanceOf(Content::class, $dot);
$this->assertNotEmpty($dot->toString());
$this->assertNotSame('', $dot->toString());
$lines = $dot
->lines()
->map(static fn($line) => $line->str()->trim()->toString())
Expand Down Expand Up @@ -81,7 +81,7 @@ public function testRenderRecursiveGraph()
$dot = Render::of()(Lookup::of()($a));

$this->assertInstanceOf(Content::class, $dot);
$this->assertNotEmpty($dot->toString());
$this->assertNotSame('', $dot->toString());
$lines = $dot
->lines()
->map(static fn($line) => $line->str()->trim()->toString())
Expand Down Expand Up @@ -109,7 +109,7 @@ public function testRenderFromTopToBottom()
$dot = Render::of()->fromTopToBottom()($graph);

$this->assertInstanceOf(Content::class, $dot);
$this->assertNotEmpty($dot->toString());
$this->assertNotSame('', $dot->toString());
$lines = $dot
->lines()
->map(static fn($line) => $line->str()->trim()->toString())
Expand Down
2 changes: 1 addition & 1 deletion tests/RewriteLocation/SublimeHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RewriteLocation,
};
use Innmind\Url\Url;
use PHPUnit\Framework\TestCase;
use Innmind\BlackBox\PHPUnit\Framework\TestCase;

class SublimeHandlerTest extends TestCase
{
Expand Down
Loading