@@ -84,21 +84,18 @@ public function testIndexActionFetches100MostRecentlyUpdatedUserRepositories()
84
84
$ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
85
85
}
86
86
87
- public function testIndexActionRendersValidModulesOnly ()
87
+ public function testIndexActionRendersUnregisteredModulesOnly ()
88
88
{
89
89
$ this ->authenticatedAs (new User ());
90
90
91
- $ validModule = $ this ->validModule ();
92
-
93
- $ nonModule = $ this ->nonModule ();
91
+ $ unregisteredModule = $ this ->validModule ();
94
92
$ registeredModule = $ this ->registeredModule ();
95
93
96
94
$ repositories = [
97
- $ validModule ,
98
- $ nonModule ,
95
+ $ unregisteredModule ,
99
96
$ registeredModule ,
100
- $ this ->forkedModule (),
101
97
$ this ->moduleWithoutPushPermissions (),
98
+ $ this ->forkedModule (),
102
99
];
103
100
104
101
$ repositoryCollection = $ this ->repositoryCollectionMock ($ repositories );
@@ -119,18 +116,6 @@ public function testIndexActionRendersValidModulesOnly()
119
116
->getMock ()
120
117
;
121
118
122
- $ moduleService
123
- ->expects ($ this ->any ())
124
- ->method ('isModule ' )
125
- ->willReturnCallback (function ($ repository ) use ($ nonModule ) {
126
- if ($ repository !== $ nonModule ) {
127
- return true ;
128
- }
129
-
130
- return false ;
131
- })
132
- ;
133
-
134
119
$ moduleMapper = $ this ->getMockBuilder (Mapper \Module::class)
135
120
->disableOriginalConstructor ()
136
121
->getMock ()
@@ -180,7 +165,7 @@ public function testIndexActionRendersValidModulesOnly()
180
165
181
166
$ this ->assertInternalType ('array ' , $ viewVariable );
182
167
$ this ->assertCount (1 , $ viewVariable );
183
- $ this ->assertSame ($ validModule , $ viewVariable [0 ]);
168
+ $ this ->assertSame ($ unregisteredModule , $ viewVariable [0 ]);
184
169
}
185
170
186
171
public function testOrganizationActionRedirectsIfNotAuthenticated ()
@@ -290,18 +275,15 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
290
275
$ this ->assertResponseStatusCode (Http \Response::STATUS_CODE_200 );
291
276
}
292
277
293
- public function testOrganizationActionRendersValidModulesOnly ()
278
+ public function testOrganizationActionRendersUnregisteredModulesOnly ()
294
279
{
295
280
$ this ->authenticatedAs (new User ());
296
281
297
- $ validModule = $ this ->validModule ();
298
-
299
- $ nonModule = $ this ->nonModule ();
282
+ $ unregisteredModule = $ this ->validModule ();
300
283
$ registeredModule = $ this ->registeredModule ();
301
284
302
285
$ repositories = [
303
- $ validModule ,
304
- $ nonModule ,
286
+ $ unregisteredModule ,
305
287
$ registeredModule ,
306
288
$ this ->forkedModule (),
307
289
$ this ->moduleWithoutPushPermissions (),
@@ -327,18 +309,6 @@ public function testOrganizationActionRendersValidModulesOnly()
327
309
->getMock ()
328
310
;
329
311
330
- $ moduleService
331
- ->expects ($ this ->any ())
332
- ->method ('isModule ' )
333
- ->willReturnCallback (function ($ repository ) use ($ nonModule ) {
334
- if ($ repository !== $ nonModule ) {
335
- return true ;
336
- }
337
-
338
- return false ;
339
- })
340
- ;
341
-
342
312
$ moduleMapper = $ this ->getMockBuilder (Mapper \Module::class)
343
313
->disableOriginalConstructor ()
344
314
->getMock ()
@@ -393,7 +363,7 @@ public function testOrganizationActionRendersValidModulesOnly()
393
363
394
364
$ this ->assertInternalType ('array ' , $ viewVariable );
395
365
$ this ->assertCount (1 , $ viewVariable );
396
- $ this ->assertSame ($ validModule , $ viewVariable [0 ]);
366
+ $ this ->assertSame ($ unregisteredModule , $ viewVariable [0 ]);
397
367
}
398
368
399
369
public function testAddActionRedirectsIfNotAuthenticated ()
0 commit comments