File tree Expand file tree Collapse file tree
apps/updatenotification/tests/Notification Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,9 +112,34 @@ public function testRun() {
112112 $ job ->expects ($ this ->once ())
113113 ->method ('checkAppUpdates ' );
114114
115+ $ this ->config ->expects ($ this ->exactly (2 ))
116+ ->method ('getSystemValueBool ' )
117+ ->withConsecutive (
118+ ['has_internet_connection ' , true ],
119+ ['debug ' , false ],
120+ )
121+ ->willReturnOnConsecutiveCalls (
122+ true ,
123+ true ,
124+ );
125+
126+ self ::invokePrivate ($ job , 'run ' , [null ]);
127+ }
128+
129+ public function testRunNoInternet () {
130+ $ job = $ this ->getJob ([
131+ 'checkCoreUpdate ' ,
132+ 'checkAppUpdates ' ,
133+ ]);
134+
135+ $ job ->expects ($ this ->never ())
136+ ->method ('checkCoreUpdate ' );
137+ $ job ->expects ($ this ->never ())
138+ ->method ('checkAppUpdates ' );
139+
115140 $ this ->config ->method ('getSystemValueBool ' )
116- ->with ('debug ' , false )
117- ->willReturn (true );
141+ ->with ('has_internet_connection ' , true )
142+ ->willReturn (false );
118143
119144 self ::invokePrivate ($ job , 'run ' , [null ]);
120145 }
You can’t perform that action at this time.
0 commit comments