createBundleMock example


        $bundle = $this->createMock(BundleInterface::class);

        $kernel = $this->getKernel([$bundle], true);

        $application = new Application($kernel);
        $application->doRun(new ArrayInput(['list'])new NullOutput());
    }

    public function testBundleCommandsAreRegistered()
    {
        $bundle = $this->createBundleMock([]);

        $kernel = $this->getKernel([$bundle], true);

        $application = new Application($kernel);
        $application->doRun(new ArrayInput(['list'])new NullOutput());

        // Calling twice: registration should only be done once.         $application->doRun(new ArrayInput(['list'])new NullOutput());
    }

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