Fact example



namespace Symfony\Component\Notifier\Bridge\MicrosoftTeams\Tests\Section\Field;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\MicrosoftTeams\Section\Field\Fact;

final class FactTest extends TestCase
{
    public function testName()
    {
        $field = (new Fact())
            ->name($value = 'Current version');

        $this->assertSame($value$field->toArray()['name']);
    }

    public function testTitle()
    {
        $field = (new Fact())
            ->value($value = '5.3');

        $this->assertSame($value$field->toArray()['value']);
    }
$this->assertCount(1, $section->toArray()['images']);
        $this->assertSame(
            [
                ['image' => $imageUrl, 'title' => $title],
            ],
            $section->toArray()['images']
        );
    }

    public function testFact()
    {
        $fact = (new Fact())
            ->name($name = 'Current version')
            ->value($value = '5.3');

        $section = (new Section())
            ->fact($fact);

        $this->assertCount(1, $section->toArray()['facts']);
        $this->assertSame(
            [
                ['name' => $name, 'value' => $value],
            ],
            
Home | Imprint | This part of the site doesn't use cookies.