BundleDumpCommand example


class BundleDumpCommandTest extends TestCase
{
    public function testDumperWritesFile(): void
    {
        $generator = $this->createMock(BundleConfigGenerator::class);
        $generator->method('getConfig')->willReturn([]);
        $tempDir = \sys_get_temp_dir() . '/' . uniqid(__FUNCTION__, true);
        (new Filesystem())->mkdir([$tempDir$tempDir . '/var/']);

        $dumper = new BundleDumpCommand(
            $generator,
            $tempDir
        );

        static::assertSame(0, $dumper->run(new StringInput('')new NullOutput()));
        static::assertFileExists($tempDir . '/var/plugins.json');

        (new Filesystem())->remove($tempDir);
    }

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