Skip to content
Extraits de code Groupes Projets

Comparer les révisions

Les modifications sont affichées comme si la révision source était fusionnée avec la révision cible. En savoir plus sur la comparaison des révisions.

Source

Sélectionner le projet cible
No results found

Cible

Sélectionner le projet cible
  • spip-league/composer-installer
1 résultat
Afficher les modifications
Affichage de
avec 93 ajouts et 72 suppressions
...@@ -44,19 +44,20 @@ class PreferredInstallTest extends TestCase ...@@ -44,19 +44,20 @@ class PreferredInstallTest extends TestCase
], ],
'preferred' => ['spip/*' => 'source'], 'preferred' => ['spip/*' => 'source'],
'requires' => [ 'requires' => [
'mandatory' => new Link('mandatory', 'spip/mandatory', new Constraint('=', '*')), 'mandatory' => new Link('mandatory', 'spip/mandatory', new Constraint('=', '*')),
'template' => new Link('template', 'spip/default-template', new Constraint('=', '*')), 'template' => new Link('template', 'spip/default-template', new Constraint('=', '*')),
'package' => new Link('package', 'spip/package', new Constraint('=', '*')), 'package' => new Link('package', 'spip/package', new Constraint('=', '*')),
'other-package' => new Link('other-package', 'other/package', new Constraint('=', '*')), 'other-package' => new Link('other-package', 'other/package', new Constraint('=', '*')),
'private-template' => new Link('private-template', 'spip/private-template', new Constraint('=', '*')), 'private-template' => new Link('private-template', 'spip/private-template', new Constraint(
'back-office' => new Link('back-office', 'spip/back-office', new Constraint('=', '*')), '=',
'*',
)),
'back-office' => new Link('back-office', 'spip/back-office', new Constraint('=', '*')),
], ],
'extra' => [ 'extra' => [
'spip' => [ 'spip' => [
'template' => 'spip/default-template', 'template' => 'spip/default-template',
'extensions' => [ 'extensions' => ['spip/mandatory'],
'spip/mandatory',
],
'private_template' => 'spip/private-template', 'private_template' => 'spip/private-template',
'back_office' => 'spip/back-office', 'back_office' => 'spip/back-office',
], ],
...@@ -75,16 +76,14 @@ class PreferredInstallTest extends TestCase ...@@ -75,16 +76,14 @@ class PreferredInstallTest extends TestCase
], ],
'preferred' => ['one/*' => 'source', 'two/*' => 'source'], 'preferred' => ['one/*' => 'source', 'two/*' => 'source'],
'requires' => [ 'requires' => [
'mandatory1' => new Link('mandatory', 'one/mandatory1', new Constraint('=', '*')), 'mandatory1' => new Link('mandatory', 'one/mandatory1', new Constraint('=', '*')),
'template2' => new Link('template', 'two/template2', new Constraint('=', '*')), 'template2' => new Link('template', 'two/template2', new Constraint('=', '*')),
'other-package' => new Link('other-package', 'other/package', new Constraint('=', '*')), 'other-package' => new Link('other-package', 'other/package', new Constraint('=', '*')),
], ],
'extra' => [ 'extra' => [
'spip' => [ 'spip' => [
'template' => 'two/template2', 'template' => 'two/template2',
'extensions' => [ 'extensions' => ['one/mandatory1'],
'one/mandatory1',
],
], ],
], ],
], ],
......
...@@ -19,7 +19,9 @@ use SpipLeague\Test\Composer\Fixtures\SpecificationStub; ...@@ -19,7 +19,9 @@ use SpipLeague\Test\Composer\Fixtures\SpecificationStub;
class CollectionTest extends TestCase class CollectionTest extends TestCase
{ {
private SpecificationStub $validStub; private SpecificationStub $validStub;
private Collection $testCollection; private Collection $testCollection;
private RemoteUrls $changer; private RemoteUrls $changer;
protected function setUp(): void protected function setUp(): void
...@@ -42,7 +44,6 @@ class CollectionTest extends TestCase ...@@ -42,7 +44,6 @@ class CollectionTest extends TestCase
// An exception is thrown // An exception is thrown
} }
public function testInvalidSpecificationByArrayAccess() public function testInvalidSpecificationByArrayAccess()
{ {
// Given // Given
...@@ -140,7 +141,10 @@ class CollectionTest extends TestCase ...@@ -140,7 +141,10 @@ class CollectionTest extends TestCase
$actual = \json_encode($this->testCollection); $actual = \json_encode($this->testCollection);
// Then // Then
$this->assertSame('{"valid":{"path":"path","source":"source"},"test":{"path":"path","source":"source"}}', $actual); $this->assertSame(
'{"valid":{"path":"path","source":"source"},"test":{"path":"path","source":"source"}}',
$actual,
);
} }
public static function dataFromJsonFile() public static function dataFromJsonFile()
...@@ -186,7 +190,7 @@ class CollectionTest extends TestCase ...@@ -186,7 +190,7 @@ class CollectionTest extends TestCase
$this->expectExceptionMessageMatches(',Fixtures/malformed.json" malformed,'); $this->expectExceptionMessageMatches(',Fixtures/malformed.json" malformed,');
// When // When
Collection::fromJsonFile($this->changer, __DIR__ . '/../Fixtures/malformed.json'); Collection::fromJsonFile($this->changer, __DIR__ . '/../Fixtures/malformed.json');
// Then // Then
// An exception is thrown // An exception is thrown
......
...@@ -3,12 +3,9 @@ ...@@ -3,12 +3,9 @@
namespace SpipLeague\Test\Composer\Extensions; namespace SpipLeague\Test\Composer\Extensions;
use Composer\Composer; use Composer\Composer;
use Composer\Config;
use Composer\Factory as ComposerFactory; use Composer\Factory as ComposerFactory;
use Composer\IO\NullIO; use Composer\IO\NullIO;
use Composer\Package\Link;
use Composer\Package\RootPackage; use Composer\Package\RootPackage;
use Composer\Semver\Constraint\Constraint;
use Composer\Util\Platform; use Composer\Util\Platform;
use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\DataProvider;
...@@ -16,7 +13,6 @@ use PHPUnit\Framework\TestCase; ...@@ -16,7 +13,6 @@ use PHPUnit\Framework\TestCase;
use SpipLeague\Composer\Extensions\InvalidSpecificationException; use SpipLeague\Composer\Extensions\InvalidSpecificationException;
use SpipLeague\Composer\Extensions\Specification; use SpipLeague\Composer\Extensions\Specification;
use SpipLeague\Composer\SpipPaths; use SpipLeague\Composer\SpipPaths;
use SpipLeague\Test\Composer\Fixtures\DummyConfigSource;
use SpipLeague\Test\Composer\Fixtures\RemoteUrlsStub; use SpipLeague\Test\Composer\Fixtures\RemoteUrlsStub;
#[CoversClass(Specification::class)] #[CoversClass(Specification::class)]
...@@ -95,7 +91,7 @@ class SpecificationTest extends TestCase ...@@ -95,7 +91,7 @@ class SpecificationTest extends TestCase
if ($changer) { if ($changer) {
$specification->setChanger(new RemoteUrlsStub( $specification->setChanger(new RemoteUrlsStub(
'git@github.com:vendor/prefix.git', 'git@github.com:vendor/prefix.git',
'https://github.com/vendor/prefix.git' 'https://github.com/vendor/prefix.git',
)); ));
} }
...@@ -202,7 +198,7 @@ class SpecificationTest extends TestCase ...@@ -202,7 +198,7 @@ class SpecificationTest extends TestCase
{ {
// Given // Given
Platform::putEnv('COMPOSER', 'tests/Fixtures/create-from-composer/composer.json'); Platform::putEnv('COMPOSER', 'tests/Fixtures/create-from-composer/composer.json');
$composer = ComposerFactory::create(new NullIO); $composer = ComposerFactory::create(new NullIO());
// When // When
$actual = Specification::createFromComposer($composer, 'test/prefix'); $actual = Specification::createFromComposer($composer, 'test/prefix');
......
...@@ -10,10 +10,14 @@ class CollectionMock implements CollectionInterface ...@@ -10,10 +10,14 @@ class CollectionMock implements CollectionInterface
{ {
protected int $position = 0; protected int $position = 0;
/** @var string[] */ /**
* @var string[]
*/
protected array $keys = []; protected array $keys = [];
/** @var array<string,SpecificationInterface> */ /**
* @var array<string,SpecificationInterface>
*/
protected array $collection = []; protected array $collection = [];
private string $file; private string $file;
...@@ -70,7 +74,7 @@ class CollectionMock implements CollectionInterface ...@@ -70,7 +74,7 @@ class CollectionMock implements CollectionInterface
public function offsetGet(mixed $offset): mixed public function offsetGet(mixed $offset): mixed
{ {
return isset($this->collection[$offset]) ? $this->collection[$offset] : null; return $this->collection[$offset] ?? null;
} }
public function offsetSet(mixed $offset, mixed $value): void public function offsetSet(mixed $offset, mixed $value): void
...@@ -79,7 +83,7 @@ class CollectionMock implements CollectionInterface ...@@ -79,7 +83,7 @@ class CollectionMock implements CollectionInterface
throw new InvalidSpecificationException('A collection must only contain valid specifications.', 3); throw new InvalidSpecificationException('A collection must only contain valid specifications.', 3);
} }
if (is_null($offset) || !\is_string($offset)) { if ($offset === null || !\is_string($offset)) {
$offset = $value->getPrefix(); $offset = $value->getPrefix();
} }
......
...@@ -8,10 +8,14 @@ use SpipLeague\Composer\Git\RemoteUrlsInterface; ...@@ -8,10 +8,14 @@ use SpipLeague\Composer\Git\RemoteUrlsInterface;
class RemoteUrlsStub implements RemoteUrlsInterface class RemoteUrlsStub implements RemoteUrlsInterface
{ {
/** @var string[] */ /**
* @var string[]
*/
private array $ssh = []; private array $ssh = [];
/** @var string[] */ /**
* @var string[]
*/
private array $https = []; private array $https = [];
public function __construct(string ...$urls) public function __construct(string ...$urls)
......
...@@ -22,7 +22,7 @@ class SpecificationMock implements SpecificationInterface ...@@ -22,7 +22,7 @@ class SpecificationMock implements SpecificationInterface
string $prefix = 'prefix', string $prefix = 'prefix',
string $vendorName = 'vendor/prefix', string $vendorName = 'vendor/prefix',
string $constraint = '1.0', string $constraint = '1.0',
string $path = 'path' string $path = 'path',
) { ) {
$this->prefix = $prefix; $this->prefix = $prefix;
$this->vendorName = $vendorName; $this->vendorName = $vendorName;
......
...@@ -18,7 +18,7 @@ class SpecificationStub implements SpecificationInterface ...@@ -18,7 +18,7 @@ class SpecificationStub implements SpecificationInterface
string $prefix = '', string $prefix = '',
string $vendorName = '', string $vendorName = '',
string $constraint = '', string $constraint = '',
string $path = 'path' string $path = 'path',
) { ) {
$this->prefix = $prefix; $this->prefix = $prefix;
$this->vendorName = $vendorName; $this->vendorName = $vendorName;
......
...@@ -25,9 +25,7 @@ class SpipInstallerTest extends TestCase ...@@ -25,9 +25,7 @@ class SpipInstallerTest extends TestCase
$package->setExtra([ $package->setExtra([
'spip' => [ 'spip' => [
'template' => 'spip/default-template', 'template' => 'spip/default-template',
'extensions' => [ 'extensions' => ['spip/mandatory'],
'spip/mandatory',
],
], ],
]); ]);
$composer->setPackage($package); $composer->setPackage($package);
......
...@@ -43,11 +43,12 @@ class AnalyzerTest extends TestCase ...@@ -43,11 +43,12 @@ class AnalyzerTest extends TestCase
$this->composer = new Composer(); $this->composer = new Composer();
$this->composer->setPackage($rootPackage); $this->composer->setPackage($rootPackage);
$this->composer->setConfig(new Config()); $this->composer->setConfig(new Config());
$this->composer->getConfig()->setConfigSource( $this->composer->getConfig()
new JsonConfigSource(new JsonFile($this->tmpDir . '/AnalyzerTest.json')) ->setConfigSource(new JsonConfigSource(new JsonFile($this->tmpDir . '/AnalyzerTest.json')));
); $this->composer->getConfig()
$this->composer->getConfig()->getConfigSource()->addConfigSetting('test', 'test'); ->getConfigSource()
$this->composer->setLoop(new Loop(new HttpDownloader(new NullIO, $this->composer->getConfig()))); ->addConfigSetting('test', 'test');
$this->composer->setLoop(new Loop(new HttpDownloader(new NullIO(), $this->composer->getConfig())));
} }
protected function tearDown(): void protected function tearDown(): void
......
...@@ -32,7 +32,10 @@ class AddSpecificationTest extends TestCase ...@@ -32,7 +32,10 @@ class AddSpecificationTest extends TestCase
$this->filesystem->emptyDirectory($this->tmpDir); $this->filesystem->emptyDirectory($this->tmpDir);
$this->collection = new CollectionMock($this->tmpDir . '/AddSpecificationTest.json'); $this->collection = new CollectionMock($this->tmpDir . '/AddSpecificationTest.json');
$this->collection[] = new SpecificationMock('exist'); $this->collection[] = new SpecificationMock('exist');
\file_put_contents($this->tmpDir . '/AddSpecificationTest.json', '{"exist":{"path":"path","source":"https://git-server/vendor/exist.git","branch":"1.0","tag":"v1.0.0"}}'); \file_put_contents(
$this->tmpDir . '/AddSpecificationTest.json',
'{"exist":{"path":"path","source":"https://git-server/vendor/exist.git","branch":"1.0","tag":"v1.0.0"}}',
);
} }
protected function tearDown(): void protected function tearDown(): void
...@@ -52,7 +55,6 @@ class AddSpecificationTest extends TestCase ...@@ -52,7 +55,6 @@ class AddSpecificationTest extends TestCase
'expected' => \null, 'expected' => \null,
'prefix' => 'exist', 'prefix' => 'exist',
], ],
]; ];
} }
...@@ -66,7 +68,7 @@ class AddSpecificationTest extends TestCase ...@@ -66,7 +68,7 @@ class AddSpecificationTest extends TestCase
$actual = $operation->mark($this->collection, $this->composer); $actual = $operation->mark($this->collection, $this->composer);
// Then // Then
if (\is_null($expected)) { if ($expected === null) {
$this->assertNull($actual); $this->assertNull($actual);
} else { } else {
$this->assertInstanceOf($expected, $actual); $this->assertInstanceOf($expected, $actual);
......
...@@ -32,15 +32,18 @@ class AddToRequireTest extends TestCase ...@@ -32,15 +32,18 @@ class AddToRequireTest extends TestCase
$this->filesystem->emptyDirectory($this->tmpDir); $this->filesystem->emptyDirectory($this->tmpDir);
$rootPackage = new RootPackage('test/test', '1', '1'); $rootPackage = new RootPackage('test/test', '1', '1');
$rootPackage->setRequires(['vendor/exist' => new Link('test/test', 'vendor/exist', new Constraint('>=', '1.0'))]); $rootPackage->setRequires(
['vendor/exist' => new Link('test/test', 'vendor/exist', new Constraint('>=', '1.0'))],
);
$this->composer = new Composer(); $this->composer = new Composer();
$this->composer->setConfig(new Config()); $this->composer->setConfig(new Config());
$this->composer->getConfig()->setConfigSource( $this->composer->getConfig()
new JsonConfigSource(new JsonFile($this->tmpDir . '/AddToRequireTest.json')) ->setConfigSource(new JsonConfigSource(new JsonFile($this->tmpDir . '/AddToRequireTest.json')));
);
$this->composer->setPackage($rootPackage); $this->composer->setPackage($rootPackage);
$this->composer->getConfig()->getConfigSource()->addLink('require', 'vendor/exist', '^1.0'); $this->composer->getConfig()
->getConfigSource()
->addLink('require', 'vendor/exist', '^1.0');
} }
protected function tearDown(): void protected function tearDown(): void
......
...@@ -32,14 +32,16 @@ class AddToSpipExtraExtensionsTest extends TestCase ...@@ -32,14 +32,16 @@ class AddToSpipExtraExtensionsTest extends TestCase
$this->composer = new Composer(); $this->composer = new Composer();
$this->composer->setConfig(new Config()); $this->composer->setConfig(new Config());
$this->composer->getConfig()->setConfigSource( $this->composer->getConfig()
new JsonConfigSource(new JsonFile($this->tmpDir . '/AddToSpipExtraExtensionsTest.json')) ->setConfigSource(new JsonConfigSource(new JsonFile($this->tmpDir . '/AddToSpipExtraExtensionsTest.json')));
);
$rootPackage = new RootPackage('test/test', '1', '1'); $rootPackage = new RootPackage('test/test', '1', '1');
$this->composer->setPackage($rootPackage); $this->composer->setPackage($rootPackage);
$this->composer->getConfig()->getConfigSource()->addProperty('extra.spip.extensions', ['vendor/exist']); $this->composer->getConfig()
$this->composer->getPackage()->setExtra(['spip' => ['extensions' => ['vendor/exist']]]); ->getConfigSource()
->addProperty('extra.spip.extensions', ['vendor/exist']);
$this->composer->getPackage()
->setExtra(['spip' => ['extensions' => ['vendor/exist']]]);
} }
protected function tearDown(): void protected function tearDown(): void
...@@ -72,7 +74,7 @@ class AddToSpipExtraExtensionsTest extends TestCase ...@@ -72,7 +74,7 @@ class AddToSpipExtraExtensionsTest extends TestCase
$actual = $operation->mark(new CollectionDummy(), $this->composer); $actual = $operation->mark(new CollectionDummy(), $this->composer);
// Then // Then
if (\is_null($expected)) { if ($expected === null) {
$this->assertNull($actual); $this->assertNull($actual);
} else { } else {
$this->assertInstanceOf($expected, $actual); $this->assertInstanceOf($expected, $actual);
......
...@@ -50,7 +50,6 @@ class RemoveDirectoryTest extends TestCase ...@@ -50,7 +50,6 @@ class RemoveDirectoryTest extends TestCase
'expected' => OperationInterface::class, 'expected' => OperationInterface::class,
'directory' => 'empty', 'directory' => 'empty',
], ],
]; ];
} }
...@@ -64,7 +63,7 @@ class RemoveDirectoryTest extends TestCase ...@@ -64,7 +63,7 @@ class RemoveDirectoryTest extends TestCase
$actual = $operation->mark(new CollectionDummy(), new Composer()); $actual = $operation->mark(new CollectionDummy(), new Composer());
// Then // Then
if (\is_null($expected)) { if ($expected === null) {
$this->assertNull($actual); $this->assertNull($actual);
} else { } else {
$this->assertInstanceOf($expected, $actual); $this->assertInstanceOf($expected, $actual);
......
...@@ -33,15 +33,18 @@ class RemoveFromRequireTest extends TestCase ...@@ -33,15 +33,18 @@ class RemoveFromRequireTest extends TestCase
$this->filesystem->emptyDirectory($this->tmpDir); $this->filesystem->emptyDirectory($this->tmpDir);
$rootPackage = new RootPackage('test/test', '1', '1'); $rootPackage = new RootPackage('test/test', '1', '1');
$rootPackage->setRequires(['vendor/exist' => new Link('test/test', 'vendor/exist', new Constraint('>=', '1.0'))]); $rootPackage->setRequires(
['vendor/exist' => new Link('test/test', 'vendor/exist', new Constraint('>=', '1.0'))],
);
$this->composer = new Composer(); $this->composer = new Composer();
$this->composer->setConfig(new Config()); $this->composer->setConfig(new Config());
$this->composer->getConfig()->setConfigSource( $this->composer->getConfig()
new JsonConfigSource(new JsonFile($this->tmpDir . '/RemoveFromRequireTest.json')) ->setConfigSource(new JsonConfigSource(new JsonFile($this->tmpDir . '/RemoveFromRequireTest.json')));
);
$this->composer->setPackage($rootPackage); $this->composer->setPackage($rootPackage);
$this->composer->getConfig()->getConfigSource()->addLink('require', 'vendor/exist', '^1.0'); $this->composer->getConfig()
->getConfigSource()
->addLink('require', 'vendor/exist', '^1.0');
} }
protected function tearDown(): void protected function tearDown(): void
...@@ -75,7 +78,7 @@ class RemoveFromRequireTest extends TestCase ...@@ -75,7 +78,7 @@ class RemoveFromRequireTest extends TestCase
$actual = $operation->mark(new CollectionDummy(), $this->composer); $actual = $operation->mark(new CollectionDummy(), $this->composer);
// Then // Then
if (\is_null($expected)) { if ($expected === null) {
$this->assertNull($actual); $this->assertNull($actual);
} else { } else {
$this->assertInstanceOf($expected, $actual); $this->assertInstanceOf($expected, $actual);
......
...@@ -32,14 +32,18 @@ class RemoveFromSpipExtraExtensionsTest extends TestCase ...@@ -32,14 +32,18 @@ class RemoveFromSpipExtraExtensionsTest extends TestCase
$this->composer = new Composer(); $this->composer = new Composer();
$this->composer->setConfig(new Config()); $this->composer->setConfig(new Config());
$this->composer->getConfig()->setConfigSource( $this->composer->getConfig()
new JsonConfigSource(new JsonFile($this->tmpDir . '/RemoveFromSpipExtraExtensionsTest.json')) ->setConfigSource(
); new JsonConfigSource(new JsonFile($this->tmpDir . '/RemoveFromSpipExtraExtensionsTest.json')),
);
$rootPackage = new RootPackage('test/test', '1', '1'); $rootPackage = new RootPackage('test/test', '1', '1');
$this->composer->setPackage($rootPackage); $this->composer->setPackage($rootPackage);
$this->composer->getConfig()->getConfigSource()->addProperty('extra.spip.extensions', ['vendor/exist']); $this->composer->getConfig()
$this->composer->getPackage()->setExtra(['spip' => ['extensions' => ['vendor/exist']]]); ->getConfigSource()
->addProperty('extra.spip.extensions', ['vendor/exist']);
$this->composer->getPackage()
->setExtra(['spip' => ['extensions' => ['vendor/exist']]]);
} }
protected function tearDown(): void protected function tearDown(): void
...@@ -72,7 +76,7 @@ class RemoveFromSpipExtraExtensionsTest extends TestCase ...@@ -72,7 +76,7 @@ class RemoveFromSpipExtraExtensionsTest extends TestCase
$actual = $operation->mark(new CollectionDummy(), $this->composer); $actual = $operation->mark(new CollectionDummy(), $this->composer);
// Then // Then
if (\is_null($expected)) { if ($expected === null) {
$this->assertNull($actual); $this->assertNull($actual);
} else { } else {
$this->assertInstanceOf($expected, $actual); $this->assertInstanceOf($expected, $actual);
......
...@@ -31,7 +31,10 @@ class RemoveSpecificationTest extends TestCase ...@@ -31,7 +31,10 @@ class RemoveSpecificationTest extends TestCase
$this->filesystem->emptyDirectory($this->tmpDir); $this->filesystem->emptyDirectory($this->tmpDir);
$this->collection = new CollectionMock($this->tmpDir . '/RemoveSpecificationTest.json'); $this->collection = new CollectionMock($this->tmpDir . '/RemoveSpecificationTest.json');
$this->collection[] = new SpecificationMock('exist'); $this->collection[] = new SpecificationMock('exist');
\file_put_contents($this->tmpDir . '/RemoveSpecificationTest.json', '{"exist":{"path":"path","source":"source","branch":"1.0"}}'); \file_put_contents(
$this->tmpDir . '/RemoveSpecificationTest.json',
'{"exist":{"path":"path","source":"source","branch":"1.0"}}',
);
} }
protected function tearDown(): void protected function tearDown(): void
...@@ -51,7 +54,6 @@ class RemoveSpecificationTest extends TestCase ...@@ -51,7 +54,6 @@ class RemoveSpecificationTest extends TestCase
'expected' => OperationInterface::class, 'expected' => OperationInterface::class,
'prefix' => 'exist', 'prefix' => 'exist',
], ],
]; ];
} }
...@@ -65,7 +67,7 @@ class RemoveSpecificationTest extends TestCase ...@@ -65,7 +67,7 @@ class RemoveSpecificationTest extends TestCase
$actual = $operation->mark($this->collection, $this->composer); $actual = $operation->mark($this->collection, $this->composer);
// Then // Then
if (\is_null($expected)) { if ($expected === null) {
$this->assertNull($actual); $this->assertNull($actual);
} else { } else {
$this->assertInstanceOf($expected, $actual); $this->assertInstanceOf($expected, $actual);
......
...@@ -64,7 +64,7 @@ class SwitcherTest extends TestCase ...@@ -64,7 +64,7 @@ class SwitcherTest extends TestCase
// When // When
$switcher->to($operation); $switcher->to($operation);
foreach($switcher->flush(fn() => $this->composer) as $message) { foreach ($switcher->flush(fn() => $this->composer) as $message) {
$actual[] = $message; $actual[] = $message;
} }
......