Skip to content
Draft
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
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"fakerphp/faker": "^1.24",
"fig/log-test": "^1.0",
"gajus/dindent": "^2.0.1",
"jangregor/phpstan-prophecy": "^1.0",
"league/csv": "^9.0",
"league/flysystem-memory": "^1.0 || ^3.29",
"phpbench/phpbench": "^1.4",
Expand All @@ -70,7 +69,7 @@
"phpstan/phpstan-strict-rules": "^1.6",
"phpstan/phpstan-symfony": "^1.4",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^10.5",
"phpunit/phpunit": "^10.5 || ^12.0",
"qossmic/deptrac-shim": "^1.0.2",
"rector/rector": "^1.2.10",
"squizlabs/php_codesniffer": "^3.13",
Expand Down
773 changes: 369 additions & 404 deletions composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class INotifyWatcherTest extends TestCase
{
private LoopInterface $loop;
private MockObject|EventDispatcherInterface $dispatcher;
private EventDispatcherInterface&MockObject $dispatcher;
private INotifyWatcher $watcher;
private string $testDir;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
use Flyfinder\Specification\IsHidden;
use Flyfinder\Specification\NotSpecification;
use Flyfinder\Specification\OrSpecification;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

/** @coversDefaultClass \phpDocumentor\Parser\SpecificationFactory */
#[CoversClass(SpecificationFactory::class)]
final class SpecificationFactoryTest extends TestCase
{
private SpecificationFactory $fixture;
Expand Down
3 changes: 2 additions & 1 deletion packages/filesystem/tests/unit/PathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@

namespace phpDocumentor\FileSystem;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;

/** @coversDefaultClass Path */
#[CoversClass(Path::class)]
final class PathTest extends TestCase
{
public function testItCanContainALocationOnAStorageService(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@

use phpDocumentor\Guides\Nodes\InlineCompoundNode;
use phpDocumentor\Guides\Nodes\ParagraphNode;
use phpDocumentor\Guides\RestructuredText\Parser\LinesIterator;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\UsesClass;

#[UsesClass(LinesIterator::class)]
#[CoversMethod(ParagraphRule::class, '__construct')]

Check failure on line 24 in packages/guides-restructured-text/tests/unit/Parser/Productions/ParagraphRuleTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(ParagraphRule::class, 'apply')]

Check failure on line 25 in packages/guides-restructured-text/tests/unit/Parser/Productions/ParagraphRuleTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(ParagraphRule::class, 'applies')]

Check failure on line 26 in packages/guides-restructured-text/tests/unit/Parser/Productions/ParagraphRuleTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(ParagraphRule::class, 'isWhiteline')]

Check failure on line 27 in packages/guides-restructured-text/tests/unit/Parser/Productions/ParagraphRuleTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
final class ParagraphRuleTest extends RuleTestCase
{
/**
* @uses \phpDocumentor\Guides\RestructuredText\Parser\LinesIterator
*
* @covers \phpDocumentor\Guides\RestructuredText\Parser\Productions\ParagraphRule::__construct
* @covers \phpDocumentor\Guides\RestructuredText\Parser\Productions\ParagraphRule::apply
* @covers \phpDocumentor\Guides\RestructuredText\Parser\Productions\ParagraphRule::applies
* @covers \phpDocumentor\Guides\RestructuredText\Parser\Productions\ParagraphRule::isWhiteline
*/
#[DataProvider('paragraphProvider')]
public function testParagraphNodeFromLinesIterator(
string $input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@
namespace phpDocumentor\Guides\Nodes\DefinitionLists;

use phpDocumentor\Guides\Nodes\InlineCompoundNode;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\TestCase;

/** @coversDefaultClass \phpDocumentor\Guides\Nodes\DefinitionLists\DefinitionListItemNode */
#[CoversClass(DefinitionListItemNode::class)]
#[CoversMethod(DefinitionListItemNode::class, '__construct')]

Check failure on line 22 in packages/guides/tests/unit/Nodes/DefinitionLists/DefinitionListTermTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(DefinitionListItemNode::class, 'getTerm')]

Check failure on line 23 in packages/guides/tests/unit/Nodes/DefinitionLists/DefinitionListTermTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(DefinitionListItemNode::class, 'getClassifiers')]

Check failure on line 24 in packages/guides/tests/unit/Nodes/DefinitionLists/DefinitionListTermTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
final class DefinitionListTermTest extends TestCase
{
/**
* @covers ::__construct
* @covers ::getTerm
*/
public function testTheDefinitionTermTextIsAvailable(): void
{
$term = new InlineCompoundNode([]);
Expand All @@ -32,10 +33,6 @@
self::assertSame($term, $definitionListTerm->getTerm());
}

/**
* @covers ::__construct
* @covers ::getClassifiers
*/
public function testClassifiersAreMadeAvailable(): void
{
$term = new InlineCompoundNode([]);
Expand All @@ -46,7 +43,6 @@
self::assertSame([$classifier], $definitionListTerm->getClassifiers());
}

/** @covers ::__construct */
public function testDefinitionsAreMadeAvailable(): void
{
$term = new InlineCompoundNode([]);
Expand Down
14 changes: 7 additions & 7 deletions packages/guides/tests/unit/Nodes/ListItemNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
* @link https://phpdoc.org
*/

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\TestCase;

/** @coversDefaultClass \phpDocumentor\Guides\Nodes\ListItemNode */
#[CoversClass(ListItemNode::class)]
#[CoversMethod(ListItemNode::class, '__construct')]

Check failure on line 30 in packages/guides/tests/unit/Nodes/ListItemNodeTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(ListItemNode::class, 'getPrefix')]

Check failure on line 31 in packages/guides/tests/unit/Nodes/ListItemNodeTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(ListItemNode::class, 'isOrdered')]

Check failure on line 32 in packages/guides/tests/unit/Nodes/ListItemNodeTest.php

View workflow job for this annotation

GitHub Actions / Static analysis / Static Code Analysis (8.2)

Attribute class PHPUnit\Framework\Attributes\CoversMethod does not exist.
#[CoversMethod(ListItemNode::class, 'getValue')]
final class ListItemNodeTest extends TestCase
{
/**
* @covers ::__construct
* @covers ::getPrefix
* @covers ::isOrdered
* @covers ::getValue
*/
public function testPrefixingCharacterTypeOfListAndContentsOfItemCanBeRecorded(): void
{
$contents = [
Expand Down
12 changes: 6 additions & 6 deletions packages/guides/tests/unit/Nodes/SeparatorNodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
* @link https://phpdoc.org
*/

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversMethod;
use PHPUnit\Framework\TestCase;

/** @coversDefaultClass \phpDocumentor\Guides\Nodes\SeparatorNode */
#[CoversClass(SeparatorNode::class)]
#[CoversMethod(SeparatorNode::class, '__construct')]
#[CoversMethod(SeparatorNode::class, 'getLevel')]
#[CoversMethod(SeparatorNode::class, 'getValue')]
final class SeparatorNodeTest extends TestCase
{
/**
* @covers ::__construct
* @covers ::getLevel
* @covers ::getValue
*/
public function testASeparatorCanBeDefinedWithALevel(): void
{
$node = new SeparatorNode(2);
Expand Down
Loading
Loading