checkCustomerEmailValid example

public function testCheckCustomerEmailValidThrowErrorWithNullEmailParameter(): void
    {
        if (Feature::isActive('v6.6.0.0')) {
            $this->expectException(RoutingException::class);
        } else {
            $this->expectException(MissingRequestParameterException::class);
        }

        $this->createInstance();
        $request = new Request();

        $this->administrationController->checkCustomerEmailValid($request$this->context);
    }

    public function testCheckCustomerEmailValidWithoutException(): void
    {
        $this->createInstance();
        $request = new Request([]['email' => 'random@email.com']);

        $response = $this->administrationController->checkCustomerEmailValid($request$this->context);
        static::assertIsString($response->getContent());
        static::assertEquals(
            ['isValid' => true],
            
Home | Imprint | This part of the site doesn't use cookies.