getArrayInput example

protected function setUp(): void
    {
        $this->connection = $this->getContainer()->get(Connection::class);
        $this->customerRepository = $this->getContainer()->get('customer.repository');
        $this->clearTable('cart');
        $this->clearTable('customer');
    }

    public function testCommandWithoutArguments(): void
    {
        $this->expectException(\InvalidArgumentException::class);
        $this->getCommand()->run($this->getArrayInput()new BufferedOutput());
    }

    public function testCommandWithInvalidArguments(): void
    {
        $input = new ArrayInput(['type' => 'foo']$this->createInputDefinition());

        $this->expectException(\InvalidArgumentException::class);
        $this->getCommand()->run($inputnew BufferedOutput());
    }

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