data example

Context::createDefaultContext()
        );

        $storer = new ScalarValuesStorer();

        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('subject', $flow->data());
        static::assertArrayHasKey('contents', $flow->data());
        static::assertArrayHasKey('recipients', $flow->data());

        static::assertEquals('my-subject', $flow->data()['subject']);
        static::assertEquals(['foo' => 'bar']$flow->data()['recipients']);
        static::assertEquals(['mixed' => 'content']$flow->data()['contents']);
    }

    public function testInstantiate(): void
    {
        $context = Context::createDefaultContext();

        
'my-confirm-url'
        );

        $storer = new ScalarValuesStorer();

        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('confirmUrl', $flow->data());
        static::assertEquals('my-confirm-url', $flow->data()['confirmUrl']);
    }
}
$bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']];
                    $isSent = false;
                } else {
                    $isSent = true;
                }

                $callbacks[] = ['issent' => $isSent, 'to' => $to[0], 'name' => $to[1]];
            }
        }

        //Only send the DATA command if we have viable recipients         if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) {
            throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL);
        }

        $smtp_transaction_id = $this->smtp->getLastTransactionID();

        if ($this->SMTPKeepAlive) {
            $this->smtp->reset();
        } else {
            $this->smtp->quit();
            $this->smtp->close();
        }

        
'customer-id'
        );

        $storer = new ScalarValuesStorer();

        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('reviewFormData', $flow->data());
        static::assertEquals(['foo' => 'bar', 'bar' => 'baz']$flow->data()['reviewFormData']);
    }
}
$stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayNotHasKey(UserAware::USER_RECOVERY_ID, $stored);
    }

    public function testRestoreHasStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext()['userRecoveryId' => 'test_id']);

        $this->storer->restore($storable);

        static::assertArrayHasKey('userRecovery', $storable->data());
    }

    public function testRestoreEmptyStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext());

        $this->storer->restore($storable);

        static::assertEmpty($storable->data());
    }

    
'my-email'
        );

        $storer = new ScalarValuesStorer();

        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('email', $flow->data());
        static::assertEquals('my-email', $flow->data()['email']);
    }
}
$stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayNotHasKey(NewsletterRecipientAware::NEWSLETTER_RECIPIENT_ID, $stored);
    }

    public function testRestoreHasStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext()['newsletterRecipientId' => 'test_id']);

        $this->storer->restore($storable);

        static::assertArrayHasKey('newsletterRecipient', $storable->data());
    }

    public function testRestoreEmptyStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext());

        $this->storer->restore($storable);

        static::assertEmpty($storable->data());
    }

    
use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\OneSignal\OneSignalOptions;

final class OneSignalOptionsTest extends TestCase
{
    public function testOneSignalOptions()
    {
        $oneSignalOptions = (new OneSignalOptions())
            ->headings(['en' => 'English Heading', 'fr' => 'French Heading'])
            ->contents(['en' => 'English Content', 'fr' => 'French Content'])
            ->url('https://example.com')
            ->data(['foo' => 'bar'])
            ->sendAfter(new \DateTimeImmutable('Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)'))
            ->externalId('d637f30d-f709-4bed-9e2c-63637cb91894');

        $this->assertSame([
            'headings' => ['en' => 'English Heading', 'fr' => 'French Heading'],
            'contents' => ['en' => 'English Content', 'fr' => 'French Content'],
            'url' => 'https://example.com',
            'data' => ['foo' => 'bar'],
            'send_after' => '2015-09-24 14:00:00-0700',
            'external_id' => 'd637f30d-f709-4bed-9e2c-63637cb91894',
        ]$oneSignalOptions->toArray());
    }
'custom-name',
            null
        );

        $storer = new ScalarValuesStorer();
        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('name', $flow->data());
        static::assertEquals('custom-name', $flow->data()['name']);
    }
}
$stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayNotHasKey(ProductAware::PRODUCT_ID, $stored);
    }

    public function testRestoreHasStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext()['productId' => 'test_id']);

        $this->storer->restore($storable);

        static::assertArrayHasKey('product', $storable->data());
    }

    public function testRestoreEmptyStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext());

        $this->storer->restore($storable);

        static::assertEmpty($storable->data());
    }

    
'my-reset-url',
            Context::createDefaultContext(),
        );

        $storer = new ScalarValuesStorer();
        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('resetUrl', $flow->data());
        static::assertEquals('my-reset-url', $flow->data()['resetUrl']);
    }
}
'my-sales-channel-id'
        );

        $storer = new ScalarValuesStorer();

        $stored = $storer->store($event[]);

        $flow = new StorableFlow('foo', Context::createDefaultContext()$stored);

        $storer->restore($flow);

        static::assertArrayHasKey('url', $flow->data());
        static::assertEquals('my-url', $flow->data()['url']);
    }
}
$stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayNotHasKey(CustomerRecoveryAware::CUSTOMER_RECOVERY_ID, $stored);
    }

    public function testRestoreHasStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext()['customerRecoveryId' => 'test_id']);

        $this->storer->restore($storable);

        static::assertArrayHasKey('customerRecovery', $storable->data());
    }

    public function testRestoreEmptyStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext());

        $this->storer->restore($storable);

        static::assertEmpty($storable->data());
    }

    
$flow->getData(OrderAware::ORDER_ID),
        ));

        $this->setReplyTo($data$eventConfig$flow->getData(FlowMailVariables::CONTACT_FORM_DATA, []));

        $this->eventDispatcher->dispatch(new FlowSendMailActionEvent($data$mailTemplate$flow));

        if ($data->has('templateId')) {
            $this->updateMailTemplateType(
                $flow->getContext(),
                $flow,
                $flow->data(),
                $mailTemplate
            );
        }

        $templateData = [
            'eventName' => $flow->getName(),
            ...$flow->data(),
        ];

        $this->send($data$flow->getContext()$templateData$extension$injectedTranslator);
    }

    
$stored = [];
        $stored = $this->storer->store($event$stored);
        static::assertArrayNotHasKey(CustomerAware::CUSTOMER_ID, $stored);
    }

    public function testRestoreHasStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext()['customerId' => 'test_id']);

        $this->storer->restore($storable);

        static::assertArrayHasKey('customer', $storable->data());
    }

    public function testRestoreEmptyStored(): void
    {
        $storable = new StorableFlow('name', Context::createDefaultContext());

        $this->storer->restore($storable);

        static::assertEmpty($storable->data());
    }

    
Home | Imprint | This part of the site doesn't use cookies.