SyncComposerVersionCommand example

 \JSON_THROW_ON_ERROR));
    }

    protected function tearDown(): void
    {
        $fs = new Filesystem();
        $fs->remove($this->projectDir);
    }

    public function testSync(): void
    {
        $command = new SyncComposerVersionCommand($this->projectDir);

        $tester = new CommandTester($command);
        $tester->execute([]);

        $bundle1Json = json_decode((string) file_get_contents($this->projectDir . '/src/Bundle1/composer.json'), true, 512, \JSON_THROW_ON_ERROR);

        static::assertEquals('5.3.0', $bundle1Json['require']['symfony/symfony']);
        static::assertSame(Command::SUCCESS, $tester->getStatusCode());
    }

    public function testDryRun(): void
    {
Home | Imprint | This part of the site doesn't use cookies.