8000 minor #53483 [Scheduler] fix test (xabbuh) · symfony/symfony@9bdafbc · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 9bdafbc

Browse files
minor #53483 [Scheduler] fix test (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [Scheduler] fix test | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- a3a56a2 fix test
2 parents b164edb + a3a56a2 commit 9bdafbc

File tree

3 files changed

+31
-16
lines changed

3 files changed

+31
-16
lines changed

src/Symfony/Component/Scheduler/Tests/EventListener/DispatchSchedulerEventListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Messenger\Tests\EventListener;
12+
namespace Symfony\Component\Scheduler\Tests\EventListener;
1313

1414
use PHPUnit\Framework\TestCase;
1515
use Psr\Container\ContainerInterface;
@@ -25,7 +25,7 @@
2525
use Symfony\Component\Scheduler\Generator\MessageContext;
2626
use Symfony\Component\Scheduler\Messenger\ScheduledStamp;
2727
use Symfony\Component\Scheduler\RecurringMessage;
28-
use Symfony\Component\Scheduler\Tests\Messenger\SomeScheduleProvider;
28+
use Symfony\Component\Scheduler\Tests\Fixtures\SomeScheduleProvider;
2929
use Symfony\Component\Scheduler\Trigger\TriggerInterface;
3030

3131
class DispatchSchedulerEventListenerTest extends TestCase
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Scheduler\Tests\Fixtures;
13+
14+
use Symfony\Component\Scheduler\Schedule;
15+
use Symfony\Component\Scheduler\ScheduleProviderInterface;
16+
17+
class SomeScheduleProvider implements ScheduleProviderInterface
18+
{
19+
public function __construct(
20+
private readonly array $messages,
21+
) {
22+
}
23+
24+
public function getSchedule(): Schedule
25+
{
26+
return (new Schedule())->add(...$this->messages);
27+
}
28+
}

src/Symfony/Component/Scheduler/Tests/Messenger/SchedulerTransportFactoryTest.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
use Symfony\Component\Scheduler\Messenger\SchedulerTransport;
2121
use Symfony\Component\Scheduler\Messenger\SchedulerTransportFactory;
2222
use Symfony\Component\Scheduler\RecurringMessage;
23-
use Symfony\Component\Scheduler\Schedule;
2423
use Symfony\Component\Scheduler\ScheduleProviderInterface;
24+
use Symfony\Component\Scheduler\Tests\Fixtures\SomeScheduleProvider;
2525
use Symfony\Component\Scheduler\Trigger\TriggerInterface;
2626
use Symfony\Contracts\Service\ServiceLocatorTrait;
2727

@@ -102,19 +102,6 @@ private function makeTransportFactoryWithStubs(): SchedulerTransportFactory
102102
}
103103
}
104104

105-
class SomeScheduleProvider implements ScheduleProviderInterface
106-
{
107-
public function __construct(
108-
private readonly array $messages,
109-
) {
110-
}
111-
112-
public function getSchedule(): Schedule
113-
{
114-
return (new Schedule())->add(...$this->messages);
115-
}
116-
}
117-
118105
class Container implements ContainerInterface
119106
{
120107
use ServiceLocatorTrait;

0 commit comments

Comments
 (0)
0