77 Factory ,
88 Watch ,
99};
10- use Innmind \Server \Control \Server \ {
11- Processes \ Unix ,
12- Command ,
10+ use Innmind \Server \Control \{
11+ ServerFactory ,
12+ Server \ Command ,
1313};
1414use Innmind \TimeContinuum \Clock ;
15- use Innmind \TimeWarp \Halt \ Usleep ;
15+ use Innmind \TimeWarp \Halt ;
1616use Innmind \IO \IO ;
1717use Innmind \Url \Path ;
1818use Psr \Log \NullLogger ;
@@ -34,16 +34,16 @@ public function tearDown(): void
3434 public function testWatchFile ()
3535 {
3636 \touch ('/tmp/innmind/watch-file ' );
37- $ processes = Unix:: of (
37+ $ processes = ServerFactory:: build (
3838 Clock::live (),
3939 IO ::fromAmbientAuthority (),
40- Usleep ::new (),
41- );
40+ Halt ::new (),
41+ )-> processes () ;
4242 $ process = $ processes ->execute (Command::background (
4343 'sleep 1 && echo foo >> /tmp/innmind/watch-file && sleep 1 && echo foo >> /tmp/innmind/watch-file && sleep 1 && echo foo >> /tmp/innmind/watch-file ' ,
4444 ));
4545
46- $ watch = Factory::build ($ processes , Usleep ::new ());
46+ $ watch = Factory::build ($ processes , Halt ::new ());
4747
4848 $ either = $ watch (Path::of ('/tmp/innmind/watch-file ' ))(0 , static function ($ count , $ continuation ) {
4949 ++$ count ;
@@ -66,16 +66,16 @@ public function testWatchFile()
6666
6767 public function testWatchDirectory ()
6868 {
69- $ processes = Unix:: of (
69+ $ processes = ServerFactory:: build (
7070 Clock::live (),
7171 IO ::fromAmbientAuthority (),
72- Usleep ::new (),
73- );
72+ Halt ::new (),
73+ )-> processes () ;
7474 $ process = $ processes ->execute (Command::background (
7575 'sleep 1 && touch /tmp/innmind/watch-file && sleep 1 && rm /tmp/innmind/watch-file ' ,
7676 ));
7777
78- $ watch = Factory::build ($ processes , Usleep ::new ());
78+ $ watch = Factory::build ($ processes , Halt ::new ());
7979
8080 $ either = $ watch (Path::of ('/tmp/innmind/ ' ))(0 , static function ($ count , $ continuation ) {
8181 ++$ count ;
@@ -98,13 +98,13 @@ public function testWatchDirectory()
9898
9999 public function testReturnErrorWhenWatchingUnknownFile ()
100100 {
101- $ processes = Unix:: of (
101+ $ processes = ServerFactory:: build (
102102 Clock::live (),
103103 IO ::fromAmbientAuthority (),
104- Usleep ::new (),
105- );
104+ Halt ::new (),
105+ )-> processes () ;
106106
107- $ watch = Factory::build ($ processes , Usleep ::new ());
107+ $ watch = Factory::build ($ processes , Halt ::new ());
108108
109109 $ either = $ watch (Path::of ('/unknown/ ' ))(null , static fn ($ _ , $ continuation ) => $ continuation );
110110
@@ -118,16 +118,16 @@ public function testReturnErrorWhenWatchingUnknownFile()
118118 public function testLog ()
119119 {
120120 \touch ('/tmp/innmind/watch-file ' );
121- $ processes = Unix:: of (
121+ $ processes = ServerFactory:: build (
122122 Clock::live (),
123123 IO ::fromAmbientAuthority (),
124- Usleep ::new (),
125- );
124+ Halt ::new (),
125+ )-> processes () ;
126126 $ process = $ processes ->execute (Command::background (
127127 'sleep 1 && echo foo >> /tmp/innmind/watch-file && sleep 1 && echo foo >> /tmp/innmind/watch-file && sleep 1 && echo foo >> /tmp/innmind/watch-file ' ,
128128 ));
129129
130- $ inner = Factory::build ($ processes , Usleep ::new ());
130+ $ inner = Factory::build ($ processes , Halt ::new ());
131131 $ watch = Watch::logger ($ inner , new NullLogger );
132132
133133 $ either = $ watch (Path::of ('/tmp/innmind/watch-file ' ))(0 , static function ($ count , $ continuation ) {
0 commit comments