use PHPUnit\Framework\TestCase;
use Symfony\Component\Notifier\Bridge\Discord\Embeds\DiscordFieldEmbedObject;
use Symfony\Component\Notifier\Exception\LengthException;
final class DiscordFieldEmbedObjectTest extends TestCase
{ public function testCanBeInstantiated() { $field =
(new DiscordFieldEmbedObject()) ->
name('foo'
) ->
value('bar'
) ->
inline(true
);
$this->
assertSame([ 'name' => 'foo',
'value' => 'bar',
'inline' => true,
],
$field->
toArray());
} public function testThrowsWhenNameExceedsCharacterLimit() { $this->
expectException(LengthException::
class);