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
9 changes: 4 additions & 5 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false"
backupStaticAttributes="false" colors="true" verbose="false" convertErrorsToExceptions="true"
convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false"
colors="true" processIsolation="false"
stopOnFailure="false" stopOnError="false" stderr="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd">
<source>
<include>
<directory>src</directory>
</include>
</coverage>
</source>
<testsuites>
<testsuite name="application-tests">
<directory>tests/src/Unit</directory>
Expand Down
3 changes: 2 additions & 1 deletion tests/src/Feature/Console/GenerateCommand/ContextBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

final readonly class ContextBuilder
{
Expand Down Expand Up @@ -73,7 +74,7 @@ private function runCommand(
/** @psalm-suppress ArgumentTypeCoercion */
$output->setVerbosity($verbosityLevel ?? $this->defaultVerbosityLevel);

$this->console->run($command, $input, $output);
$this->console->run($command, $input, new SymfonyStyle($input, $output));

return $output->fetch();
}
Expand Down
7 changes: 5 additions & 2 deletions tests/src/Feature/McpTools/Traits/InteractsWithMcpTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Spiral\Console\Console;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\Console\Style\SymfonyStyle;
use Tests\Feature\McpTools\ToolExecutionResult;

/**
Expand Down Expand Up @@ -38,8 +39,9 @@ protected function executeTool(
$input['-c'] = $configPath;
}

$input = new ArrayInput($input);
$output = new BufferedOutput();
$result = $console->run('tool:run', new ArrayInput($input), $output);
$result = $console->run('tool:run', $input, new SymfonyStyle($input, $output));

return new ToolExecutionResult(
exitCode: $result->getCode(),
Expand Down Expand Up @@ -70,7 +72,8 @@ protected function getToolSchema(string $toolId, ?string $configPath = null): ar
$input['-c'] = $configPath;
}

$console->run('tool:schema', new ArrayInput($input), $output);
$input = new ArrayInput($input);
$console->run('tool:schema', $input, new SymfonyStyle($input, $output));

$decoded = \json_decode($output->fetch(), true);

Expand Down
2 changes: 2 additions & 0 deletions tests/src/Unit/Source/TextSourceFromArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

class TextSourceFromArrayTest extends TestCase
{
private TextSourceFactory $factory;

#[Test]
public function it_should_create_from_array_with_minimal_parameters(): void
{
Expand Down
Loading