use PHPUnit\Framework\TestCase;
use Symfony\Component\Scheduler\Exception\LogicException;
use Symfony\Component\Scheduler\RecurringMessage;
use Symfony\Component\Scheduler\Schedule;
class ScheduleTest extends TestCase
{ public function testCannotAddDuplicateMessage() { $schedule =
new Schedule();
$schedule->
add(RecurringMessage::
cron('* * * * *',
new \
stdClass()));
$this->
expectException(LogicException::
class);
$schedule->
add(RecurringMessage::
cron('* * * * *',
new \
stdClass()));
}}