19 declare(strict_types=1);
    31 require_once __DIR__ . 
'/bootstrap.php';
    39         $this->assertInstanceOf(UserSettings::class, 
new UserSettings($this->mock(SelectSetting::class)));
    44         $setting = $this->mock(Setting::class);
    45         $convert = $this->mock(Convert::class);
    47         $marshal = $this->mockMethod(Marshal::class, 
'boolean', [], $convert);
    49         $settings = $this->mock(SelectSetting::class);
    50         $settings->expects(self::once())->method(
'typed')->willReturnCallback(
function (
string $key, callable $select) use ($marshal, $convert, 
$setting) {
    51             $this->assertSame(
'dpro_withdrawal_requested', $key);
    52             $this->assertSame($convert, $select($marshal));
    61         $setting = $this->mock(Setting::class);
    62         $convert = $this->mock(Convert::class);
    64         $date = $this->mock(Convert::class);
    66         $marshal = $this->mockMethod(Marshal::class, 
'nullable', [$date], $convert);
    67         $marshal->expects(self::once())->method(
'dateTime')->willReturn($date);
    69         $settings = $this->mock(SelectSetting::class);
    70         $settings->expects(self::once())->method(
'typed')->willReturnCallback(
function (
string $key, callable $select) use ($marshal, $convert, 
$setting) {
    71             $this->assertSame(
'dpro_agree_date', $key);
    72             $this->assertSame($convert, $select($marshal));
 
testWithdrawalRequested()