1--TEST--
2Test Pdo\Sqlite::createCollation() arguments error
3--EXTENSIONS--
4pdo_sqlite
5--FILE--
6<?php
7
8declare(strict_types=1);
9
10$db = new Pdo\Sqlite('sqlite::memory:');
11
12class TrampolineTest {
13    public function __call(string $name, array $arguments) {
14        return '';
15    }
16}
17
18try {
19    $db->createCollation(null, [new TrampolineTest(), 'NAT']);
20} catch (Throwable $e) {
21    echo $e->getMessage() . "\n";
22}
23
24try {
25    $db->createCollation('NAT', null);
26} catch (Throwable $e) {
27    echo $e->getMessage() . "\n";
28}
29
30echo 'done!';
31?>
32--EXPECT--
33Pdo\Sqlite::createCollation(): Argument #1 ($name) must be of type string, null given
34Pdo\Sqlite::createCollation(): Argument #2 ($callback) must be a valid callback, no array or string given
35done!
36