<?php
declare(strict_types=1);
require __DIR__ . '/batch_branch.php';

if (batch_response_branch(['list' => []]) !== 'empty_only'
    || batch_response_branch(['list' => ['data' => []]]) !== 'empty_only'
    || batch_response_branch(['list' => [['id' => 1]]]) !== 'nonempty_or_scalar_candidate'
    || batch_response_branch(null) !== 'empty_only') {
    throw new RuntimeException('Empty nested list must not count positive');
}
echo "nested list branch tests: 4 green\n";
