provideInvalidComparisons example

0],
        ];
    }

    public static function provideAllInvalidComparisons(): array
    {
        $timezone = date_default_timezone_get();
        date_default_timezone_set('UTC');

        // Don't call addPhp5Dot5Comparisons() automatically, as it does         // not take care of identical objects         $comparisons = self::provideInvalidComparisons();

        date_default_timezone_set($timezone);

        return $comparisons;
    }

    public static function provideInvalidComparisons(): array
    {
        $date = new \DateTime('2000-01-01');
        $object = new ComparisonTest_Class(2);

        
->assertRaised();
        }
    }

    public static function provideAllInvalidComparisons(): array
    {
        // The provider runs before setUp(), so we need to manually fix         // the default timezone         $timezone = date_default_timezone_get();
        date_default_timezone_set('UTC');

        $comparisons = self::addPhp5Dot5Comparisons(static::provideInvalidComparisons());

        date_default_timezone_set($timezone);

        return $comparisons;
    }

    abstract public static function provideInvalidComparisons(): array;

    abstract public static function provideComparisonsToNullValueAtPropertyPath();

    abstract protected static function createConstraint(array $options = null): Constraint;

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