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
2 changes: 1 addition & 1 deletion src/Configuration/PhpUnitConfigGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function generate(ProjectContext $context): string
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by KaririCode Devkit — override via devkit.php (project root) -->
<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/12.5/phpunit.xsd"
bootstrap="../vendor/autoload.php"
cacheDirectory="build/.phpunit.cache"
executionOrder="depends,defects"
Expand Down
45 changes: 0 additions & 45 deletions tests/Unit/Command/AbstractCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,49 +184,4 @@ public function passthroughWithNoConsumedFlagsReturnsAll(): void
$result = $this->command->callPassthrough($args);
$this->assertSame($args, $result);
}

// ── Output helpers — fwrite(STDOUT/STDERR) cannot be captured by ob_start ─
// We verify these methods exist and do not throw exceptions.

#[Test]
public function infoDoesNotThrow(): void
{
$this->expectNotToPerformAssertions();
$this->command->callInfo('hello');
}

#[Test]
public function warningDoesNotThrow(): void
{
$this->expectNotToPerformAssertions();
$this->command->callWarning('caution');
}

#[Test]
public function errorDoesNotThrow(): void
{
$this->expectNotToPerformAssertions();
$this->command->callError('something failed');
}

#[Test]
public function lineDoesNotThrow(): void
{
$this->expectNotToPerformAssertions();
$this->command->callLine('some output');
}

#[Test]
public function bannerDoesNotThrow(): void
{
$this->expectNotToPerformAssertions();
$this->command->callBanner('My Banner');
}

#[Test]
public function sectionDoesNotThrow(): void
{
$this->expectNotToPerformAssertions();
$this->command->callSection('My Section');
}
}
2 changes: 2 additions & 0 deletions tests/Unit/Configuration/CsFixerConfigGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
use KaririCode\Devkit\Core\ProjectContext;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(CsFixerConfigGenerator::class)]
#[UsesClass(ProjectContext::class)]
final class CsFixerConfigGeneratorTest extends TestCase
{
private CsFixerConfigGenerator $generator;
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Configuration/PhpStanConfigGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
use KaririCode\Devkit\Core\ProjectContext;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(PhpStanConfigGenerator::class)]
#[UsesClass(ProjectContext::class)]
final class PhpStanConfigGeneratorTest extends TestCase
{
private PhpStanConfigGenerator $generator;
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Configuration/PhpUnitConfigGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
use KaririCode\Devkit\Core\ProjectContext;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(PhpUnitConfigGenerator::class)]
#[UsesClass(ProjectContext::class)]
final class PhpUnitConfigGeneratorTest extends TestCase
{
private PhpUnitConfigGenerator $generator;
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Configuration/PsalmConfigGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
use KaririCode\Devkit\Core\ProjectContext;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(PsalmConfigGenerator::class)]
#[UsesClass(ProjectContext::class)]
final class PsalmConfigGeneratorTest extends TestCase
{
private PsalmConfigGenerator $generator;
Expand Down
2 changes: 2 additions & 0 deletions tests/Unit/Configuration/RectorConfigGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
use KaririCode\Devkit\Core\ProjectContext;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(RectorConfigGenerator::class)]
#[UsesClass(ProjectContext::class)]
final class RectorConfigGeneratorTest extends TestCase
{
private RectorConfigGenerator $generator;
Expand Down
4 changes: 3 additions & 1 deletion tests/Unit/Core/DevkitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use KaririCode\Devkit\Contract\ConfigGenerator;
use KaririCode\Devkit\Contract\ToolRunner;
use KaririCode\Devkit\Core\Devkit;
use KaririCode\Devkit\Core\DevkitConfig;
use KaririCode\Devkit\Core\ProjectContext;
use KaririCode\Devkit\Core\ProjectDetector;
use KaririCode\Devkit\Exception\DevkitException;
Expand All @@ -19,7 +20,8 @@

#[CoversClass(Devkit::class)]
#[UsesClass(ProjectContext::class)]
#[UsesClass(DevkitException::class)]
#[UsesClass(ProjectDetector::class)]
#[UsesClass(DevkitConfig::class)]
#[UsesClass(QualityReport::class)]
#[UsesClass(ToolResult::class)]
final class DevkitTest extends TestCase
Expand Down
1 change: 0 additions & 1 deletion tests/Unit/Core/ProjectDetectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#[CoversClass(ProjectDetector::class)]
#[UsesClass(ProjectContext::class)]
#[UsesClass(DevkitConfig::class)]
#[UsesClass(DevkitException::class)]
final class ProjectDetectorTest extends TestCase
{
private string $tmpDir;
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Exception/ConfigurationExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@

use KaririCode\Devkit\Exception\ConfigurationException;
use KaririCode\Devkit\Exception\DevkitException;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(ConfigurationException::class)]
#[UsesClass(DevkitException::class)]
#[CoversNothing]
final class ConfigurationExceptionTest extends TestCase
{
#[Test]
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Exception/DevkitExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
namespace KaririCode\Devkit\Tests\Unit\Exception;

use KaririCode\Devkit\Exception\DevkitException;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\TestCase;

#[CoversClass(DevkitException::class)]
#[CoversNothing]
final class DevkitExceptionTest extends TestCase
{
#[Test]
Expand Down
6 changes: 2 additions & 4 deletions tests/Unit/Exception/ToolExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@

use KaririCode\Devkit\Exception\DevkitException;
use KaririCode\Devkit\Exception\ToolException;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\Test;
use PHPUnit\Framework\Attributes\UsesClass;
use PHPUnit\Framework\TestCase;

#[CoversClass(ToolException::class)]
#[UsesClass(DevkitException::class)]
#[CoversNothing]
final class ToolExceptionTest extends TestCase
{
#[Test]
Expand Down