DateInput example

public function testInput(array $expected, InputInterface $input)
    {
        $action = (new ActionCard())
            ->input($input);

        $this->assertCount(1, $action->toArray()['inputs']);
        $this->assertSame($expected$action->toArray()['inputs']);
    }

    public static function availableInputs(): \Generator
    {
        yield [[['@type' => 'DateInput']]new DateInput()];
        yield [[['@type' => 'TextInput']]new TextInput()];
        yield [[['@type' => 'MultichoiceInput']]new MultiChoiceInput()];
    }

    /** * @dataProvider compatibleActions */
    public function testAction(array $expected, ActionCardCompatibleActionInterface $action)
    {
        $section = (new ActionCard())
            ->action($action);

        


namespace Symfony\Component\Notifier\Bridge\MicrosoftTeams\Tests\Action\Input;

use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Action\Input\DateInput;
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Test\Action\Input\AbstractInputTestCase;

final class DateInputTest extends AbstractInputTestCase
{
    public function createInput(): DateInput
    {
        return new DateInput();
    }

    public function testIncludeTimeWithTrue()
    {
        $input = $this->createInput()
            ->includeTime(true);

        $this->assertTrue($input->toArray()['includeTime']);
    }

    public function testIncludeTimeWithFalse()
    {
Home | Imprint | This part of the site doesn't use cookies.