CustomerCreatedByAdminRule example


class CustomerCreatedByAdminRuleTest extends TestCase
{
    public function testGetConstraints(): void
    {
        $rule = new CustomerCreatedByAdminRule();
        $constraints = $rule->getConstraints();

        static::assertArrayHasKey('shouldCustomerBeCreatedByAdmin', $constraints, 'Constraint shouldCustomerBeCreatedByAdmin not found in Rule');
        static::assertEquals($constraints['shouldCustomerBeCreatedByAdmin'][
            new NotNull(),
            new Type(['type' => 'bool']),
        ]);
    }

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