Skip to content
Closed
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"php": "^8.3"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
"phpunit/phpunit": "^9.6",
"symfony/yaml": "^7.0",
"ibexa/connector-gemini": "5.0.x-dev",
"ibexa/automated-translation": "5.0.x-dev",
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd"
bootstrap="tests/bootstrap.php"
colors="true"
failOnWarning="true"
Expand Down
4 changes: 2 additions & 2 deletions tests/InlineSamples/InlinePhpPipelineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Ibexa\Tests\Documentation\InlineSamples;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/**
Expand Down Expand Up @@ -209,8 +208,9 @@ public function testMultiLineChangePreservesStructure(): void

/**
* @param array<string, string> $fixerReplacements
*
* @dataProvider provideIdempotencyCases
*/
#[DataProvider('provideIdempotencyCases')]
public function testPipelineIsIdempotent(string $md, array $fixerReplacements): void
{
// First pass (may or may not change the Markdown).
Expand Down
4 changes: 2 additions & 2 deletions tests/InlineSamples/InlinePhpSyncerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Ibexa\Tests\Documentation\InlineSamples;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/**
Expand Down Expand Up @@ -311,8 +310,9 @@ public function testSyncHandlesIndentedBlockWithPhpTagAndBlankLine(): void

/**
* @param array<string, string> $replacements Simulated cs-fixer changes: old => new.
*
* @dataProvider provideRoundtripCases
*/
#[DataProvider('provideRoundtripCases')]
public function testRoundtripAppliesChangesAndIsIdempotent(
string $md,
array $replacements,
Expand Down
4 changes: 2 additions & 2 deletions tests/InlineSamples/InlinePhpWriterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Ibexa\Tests\Documentation\InlineSamples;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/**
Expand Down Expand Up @@ -141,8 +140,9 @@ public function testBodyAfterPhpTagContainsNamespace(): void
/**
* @param string $body Input body (from MarkdownExtractor)
* @param string $expectedBody Expected body section after the blank separator
*
* @dataProvider provideExactContent
*/
#[DataProvider('provideExactContent')]
public function testExactFileContent(string $sourcePath, int $line, string $body, string $expectedBody): void
{
$expected = sprintf(InlinePhpWriter::FILE_TEMPLATE, $sourcePath, $line, $expectedBody);
Expand Down
4 changes: 2 additions & 2 deletions tests/InlineSamples/MarkdownExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Ibexa\Tests\Documentation\InlineSamples;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class MarkdownExtractorTest extends TestCase
Expand Down Expand Up @@ -185,8 +184,9 @@ public function testSkipsOnlyMatchingBlocksWhenMixed(): void

/**
* @param array<array{body: string, line: int}> $expected
*
* @dataProvider provideMultilineBlocks
*/
#[DataProvider('provideMultilineBlocks')]
public function testExtractsMultilineBody(string $content, array $expected): void
{
$blocks = iterator_to_array($this->extractor->extract($content));
Expand Down
4 changes: 2 additions & 2 deletions tests/Markdown/MarkdownYamlExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace Ibexa\Tests\Documentation\Markdown;

use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

final class MarkdownYamlExtractorTest extends TestCase
Expand Down Expand Up @@ -185,8 +184,9 @@ public function testSkipsOnlyMatchingBlocksWhenMixed(): void

/**
* @param array<array{body: string, line: int}> $expected
*
* @dataProvider provideMultilineBlocks
*/
#[DataProvider('provideMultilineBlocks')]
public function testExtractsMultilineBody(string $content, array $expected): void
{
$blocks = iterator_to_array($this->extractor->extract($content));
Expand Down
13 changes: 8 additions & 5 deletions tests/Yaml/YamlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@

use Ibexa\Tests\Documentation\ConfigurationProvider;
use Ibexa\Tests\Documentation\ValidationBaseline;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Yaml\Exception\ParseException;
use Symfony\Component\Yaml\Yaml;

#[Group('yaml')]
/**
* @group yaml
*/
final class YamlTest extends TestCase
{
private const string REPO_ROOT = __DIR__ . '/../../';
private const string BASELINE_FILE = __DIR__ . '/../yaml-validation-baseline.yaml';

#[DataProvider('provideYamlSources')]
/**
* @dataProvider provideYamlSources
*/
public function testYamlIsSyntacticallyValid(string $filePath, int $line, string $body, string $bodyHash): void
{
$filePath = self::relativePath($filePath);
Expand Down Expand Up @@ -54,8 +56,9 @@ public function testYamlIsSyntacticallyValid(string $filePath, int $line, string

/**
* @param int $line Starting line of the config block (0 for standalone YAML files).
*
* @dataProvider provideBundleConfigs
*/
#[DataProvider('provideBundleConfigs')]
public function testBundleConfigurationIsValid(
string $extensionName,
mixed $config,
Expand Down
Loading