77use CodeRhapsodie \DataflowBundle \Entity \Job ;
88use CodeRhapsodie \DataflowBundle \Event \Events ;
99use CodeRhapsodie \DataflowBundle \Event \ProcessingEvent ;
10+ use CodeRhapsodie \DataflowBundle \Gateway \JobGateway ;
1011use CodeRhapsodie \DataflowBundle \Processor \JobProcessor ;
1112use CodeRhapsodie \DataflowBundle \Registry \DataflowTypeRegistryInterface ;
1213use CodeRhapsodie \DataflowBundle \Repository \JobRepository ;
@@ -20,14 +21,16 @@ class JobProcessorTest extends TestCase
2021 private JobRepository |MockObject $ repository ;
2122 private DataflowTypeRegistryInterface |MockObject $ registry ;
2223 private EventDispatcherInterface |MockObject $ dispatcher ;
24+ private JobGateway |MockObject $ jobGateway ;
2325
2426 protected function setUp (): void
2527 {
2628 $ this ->repository = $ this ->createMock (JobRepository::class);
2729 $ this ->registry = $ this ->createMock (DataflowTypeRegistryInterface::class);
2830 $ this ->dispatcher = $ this ->createMock (EventDispatcherInterface::class);
31+ $ this ->jobGateway = $ this ->createMock (JobGateway::class);
2932
30- $ this ->processor = new JobProcessor ($ this ->repository , $ this ->registry , $ this ->dispatcher );
33+ $ this ->processor = new JobProcessor ($ this ->repository , $ this ->registry , $ this ->dispatcher , $ this -> jobGateway );
3134 }
3235
3336 public function testProcess ()
@@ -72,7 +75,7 @@ public function testProcess()
7275 ->willReturn ($ result )
7376 ;
7477
75- $ this ->repository
78+ $ this ->jobGateway
7679 ->expects ($ this ->exactly (2 ))
7780 ->method ('save ' )
7881 ;
0 commit comments