Skip to content

Commit 07b6bac

Browse files
authored
Merge pull request #13 from KaririCode-Framework/develop
Develop
2 parents 4f711dd + e86f018 commit 07b6bac

12 files changed

Lines changed: 20 additions & 58 deletions

src/Configuration/PhpUnitConfigGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function generate(ProjectContext $context): string
4141
<?xml version="1.0" encoding="UTF-8"?>
4242
<!-- Generated by KaririCode Devkit — override via devkit.php (project root) -->
4343
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd"
44+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.5/phpunit.xsd"
4545
bootstrap="../vendor/autoload.php"
4646
cacheDirectory="build/.phpunit.cache"
4747
executionOrder="depends,defects"

tests/Unit/Command/AbstractCommandTest.php

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -184,49 +184,4 @@ public function passthroughWithNoConsumedFlagsReturnsAll(): void
184184
$result = $this->command->callPassthrough($args);
185185
$this->assertSame($args, $result);
186186
}
187-
188-
// ── Output helpers — fwrite(STDOUT/STDERR) cannot be captured by ob_start ─
189-
// We verify these methods exist and do not throw exceptions.
190-
191-
#[Test]
192-
public function infoDoesNotThrow(): void
193-
{
194-
$this->expectNotToPerformAssertions();
195-
$this->command->callInfo('hello');
196-
}
197-
198-
#[Test]
199-
public function warningDoesNotThrow(): void
200-
{
201-
$this->expectNotToPerformAssertions();
202-
$this->command->callWarning('caution');
203-
}
204-
205-
#[Test]
206-
public function errorDoesNotThrow(): void
207-
{
208-
$this->expectNotToPerformAssertions();
209-
$this->command->callError('something failed');
210-
}
211-
212-
#[Test]
213-
public function lineDoesNotThrow(): void
214-
{
215-
$this->expectNotToPerformAssertions();
216-
$this->command->callLine('some output');
217-
}
218-
219-
#[Test]
220-
public function bannerDoesNotThrow(): void
221-
{
222-
$this->expectNotToPerformAssertions();
223-
$this->command->callBanner('My Banner');
224-
}
225-
226-
#[Test]
227-
public function sectionDoesNotThrow(): void
228-
{
229-
$this->expectNotToPerformAssertions();
230-
$this->command->callSection('My Section');
231-
}
232187
}

tests/Unit/Configuration/CsFixerConfigGeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use KaririCode\Devkit\Core\ProjectContext;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\Test;
11+
use PHPUnit\Framework\Attributes\UsesClass;
1112
use PHPUnit\Framework\TestCase;
1213

1314
#[CoversClass(CsFixerConfigGenerator::class)]
15+
#[UsesClass(ProjectContext::class)]
1416
final class CsFixerConfigGeneratorTest extends TestCase
1517
{
1618
private CsFixerConfigGenerator $generator;

tests/Unit/Configuration/PhpStanConfigGeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use KaririCode\Devkit\Core\ProjectContext;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\Test;
11+
use PHPUnit\Framework\Attributes\UsesClass;
1112
use PHPUnit\Framework\TestCase;
1213

1314
#[CoversClass(PhpStanConfigGenerator::class)]
15+
#[UsesClass(ProjectContext::class)]
1416
final class PhpStanConfigGeneratorTest extends TestCase
1517
{
1618
private PhpStanConfigGenerator $generator;

tests/Unit/Configuration/PhpUnitConfigGeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use KaririCode\Devkit\Core\ProjectContext;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\Test;
11+
use PHPUnit\Framework\Attributes\UsesClass;
1112
use PHPUnit\Framework\TestCase;
1213

1314
#[CoversClass(PhpUnitConfigGenerator::class)]
15+
#[UsesClass(ProjectContext::class)]
1416
final class PhpUnitConfigGeneratorTest extends TestCase
1517
{
1618
private PhpUnitConfigGenerator $generator;

tests/Unit/Configuration/PsalmConfigGeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use KaririCode\Devkit\Core\ProjectContext;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\Test;
11+
use PHPUnit\Framework\Attributes\UsesClass;
1112
use PHPUnit\Framework\TestCase;
1213

1314
#[CoversClass(PsalmConfigGenerator::class)]
15+
#[UsesClass(ProjectContext::class)]
1416
final class PsalmConfigGeneratorTest extends TestCase
1517
{
1618
private PsalmConfigGenerator $generator;

tests/Unit/Configuration/RectorConfigGeneratorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use KaririCode\Devkit\Core\ProjectContext;
99
use PHPUnit\Framework\Attributes\CoversClass;
1010
use PHPUnit\Framework\Attributes\Test;
11+
use PHPUnit\Framework\Attributes\UsesClass;
1112
use PHPUnit\Framework\TestCase;
1213

1314
#[CoversClass(RectorConfigGenerator::class)]
15+
#[UsesClass(ProjectContext::class)]
1416
final class RectorConfigGeneratorTest extends TestCase
1517
{
1618
private RectorConfigGenerator $generator;

tests/Unit/Core/DevkitTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use KaririCode\Devkit\Contract\ConfigGenerator;
88
use KaririCode\Devkit\Contract\ToolRunner;
99
use KaririCode\Devkit\Core\Devkit;
10+
use KaririCode\Devkit\Core\DevkitConfig;
1011
use KaririCode\Devkit\Core\ProjectContext;
1112
use KaririCode\Devkit\Core\ProjectDetector;
1213
use KaririCode\Devkit\Exception\DevkitException;
@@ -19,7 +20,8 @@
1920

2021
#[CoversClass(Devkit::class)]
2122
#[UsesClass(ProjectContext::class)]
22-
#[UsesClass(DevkitException::class)]
23+
#[UsesClass(ProjectDetector::class)]
24+
#[UsesClass(DevkitConfig::class)]
2325
#[UsesClass(QualityReport::class)]
2426
#[UsesClass(ToolResult::class)]
2527
final class DevkitTest extends TestCase

tests/Unit/Core/ProjectDetectorTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#[CoversClass(ProjectDetector::class)]
1717
#[UsesClass(ProjectContext::class)]
1818
#[UsesClass(DevkitConfig::class)]
19-
#[UsesClass(DevkitException::class)]
2019
final class ProjectDetectorTest extends TestCase
2120
{
2221
private string $tmpDir;

tests/Unit/Exception/ConfigurationExceptionTest.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66

77
use KaririCode\Devkit\Exception\ConfigurationException;
88
use KaririCode\Devkit\Exception\DevkitException;
9-
use PHPUnit\Framework\Attributes\CoversClass;
9+
use PHPUnit\Framework\Attributes\CoversNothing;
1010
use PHPUnit\Framework\Attributes\Test;
11-
use PHPUnit\Framework\Attributes\UsesClass;
1211
use PHPUnit\Framework\TestCase;
1312

14-
#[CoversClass(ConfigurationException::class)]
15-
#[UsesClass(DevkitException::class)]
13+
#[CoversNothing]
1614
final class ConfigurationExceptionTest extends TestCase
1715
{
1816
#[Test]

0 commit comments

Comments
 (0)