ParagonIE\EasyDB\Tests\SetAttributeTest::GoodFactoryCreateArgument2EasyDBForSetPDOAttributeThrowsExceptionProvider PHP Метод

GoodFactoryCreateArgument2EasyDBForSetPDOAttributeThrowsExceptionProvider() публичный Метод

EasyDB data provider Returns an array of callables that return instances of EasyDB
См. также: EasyDBTest::GoodFactoryCreateArgument2EasyDBProvider()
    public function GoodFactoryCreateArgument2EasyDBForSetPDOAttributeThrowsExceptionProvider()
    {
        $exceptionProvider = [[PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT, Exception::class, 'EasyDB only allows the safest-by-default error mode (exceptions).'], [PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING, Exception::class, 'EasyDB only allows the safest-by-default error mode (exceptions).'], [PDO::ATTR_EMULATE_PREPARES, true, Exception::class, 'EasyDB does not allow the use of emulated prepared statements, which would be a security downgrade.'], [PDO::ATTR_EMULATE_PREPARES, 1, Exception::class, 'EasyDB does not allow the use of emulated prepared statements, which would be a security downgrade.']];
        return array_reduce($this->GoodFactoryCreateArgument2EasyDBProvider(), function (array $was, array $cbArgs) use($exceptionProvider) {
            return array_merge($was, array_map(function (array $args) use($cbArgs) {
                foreach (array_reverse($cbArgs) as $cbArg) {
                    array_unshift($args, $cbArg);
                }
                return $args;
            }, $exceptionProvider));
        }, []);
    }