SlackOptions example

/** * @author Oskar Stark <oskarstark@googlemail.com> */
final class SlackOptionsTest extends TestCase
{
    /** * @dataProvider toArrayProvider * @dataProvider toArraySimpleOptionsProvider */
    public function testToArray(array $options, array $expected = null)
    {
        $this->assertSame($expected ?? $options(new SlackOptions($options))->toArray());
    }

    public static function toArrayProvider(): iterable
    {
        yield 'empty is allowed' => [
            [],
            [],
        ];

        yield 'always unset recipient_id' => [
            ['recipient_id' => '42'],
            [],
Home | Imprint | This part of the site doesn't use cookies.