Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit 2c99bf4

Browse files
committed
Merge pull request #468 from localheinz/fix/organization-vs-list
Fix: organizationAction() should be listAction()
2 parents 8516bea + 50d622a commit 2c99bf4

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

module/ZfModule/config/module.config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
'owner' => '[a-zA-Z][a-zA-Z0-9_-]*',
5959
],
6060
'defaults' => [
61-
'action' => 'organization',
61+
'action' => 'list',
6262
],
6363
],
6464
],

module/ZfModule/src/ZfModule/Controller/ModuleController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function indexAction()
9898
return $viewModel;
9999
}
100100

101-
public function organizationAction()
101+
public function listAction()
102102
{
103103
if (!$this->zfcUserAuthentication()->hasIdentity()) {
104104
return $this->redirect()->toRoute('zfcuser/login');

module/ZfModule/test/ZfModuleTest/Integration/Controller/ModuleControllerTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function testIndexActionRendersUnregisteredModulesOnly()
168168
$this->assertSame($unregisteredModule, $viewVariable[0]);
169169
}
170170

171-
public function testOrganizationActionRedirectsIfNotAuthenticated()
171+
public function testListActionRedirectsIfNotAuthenticated()
172172
{
173173
$this->notAuthenticated();
174174

@@ -182,13 +182,13 @@ public function testOrganizationActionRedirectsIfNotAuthenticated()
182182
$this->dispatch($url);
183183

184184
$this->assertControllerName(Controller\ModuleController::class);
185-
$this->assertActionName('organization');
185+
$this->assertActionName('list');
186186
$this->assertResponseStatusCode(Http\Response::STATUS_CODE_302);
187187

188188
$this->assertRedirectTo('/user/login');
189189
}
190190

191-
public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesWhenNoOwnerIsSpecified()
191+
public function testListActionFetches100MostRecentlyUpdatedRepositoriesWhenNoOwnerIsSpecified()
192192
{
193193
$this->authenticatedAs(new User());
194194

@@ -224,15 +224,15 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
224224
$this->dispatch('/module/list');
225225

226226
$this->assertControllerName(Controller\ModuleController::class);
227-
$this->assertActionName('organization');
227+
$this->assertActionName('list');
228228
$this->assertResponseStatusCode(Http\Response::STATUS_CODE_200);
229229
}
230230

231231
/**
232232
* @dataProvider providerInvalidVendor
233-
* @param $vendor
233+
* @param string $vendor
234234
*/
235-
public function testOrganizationActionDoesNotMatchOnInvalidVendor($vendor)
235+
public function testListActionDoesNotMatchOnInvalidVendor($vendor)
236236
{
237237
$this->authenticatedAs(new User());
238238

@@ -289,7 +289,7 @@ public function providerInvalidVendor()
289289
];
290290
}
291291

292-
public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesWithOwnerSpecified()
292+
public function testListActionFetches100MostRecentlyUpdatedRepositoriesWithOwnerSpecified()
293293
{
294294
$this->authenticatedAs(new User());
295295

@@ -332,11 +332,11 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
332332
$this->dispatch($url);
333333

334334
$this->assertControllerName(Controller\ModuleController::class);
335-
$this->assertActionName('organization');
335+
$this->assertActionName('list');
336336
$this->assertResponseStatusCode(Http\Response::STATUS_CODE_200);
337337
}
338338

339-
public function testOrganizationActionRendersUnregisteredModulesOnly()
339+
public function testListActionRendersUnregisteredModulesOnly()
340340
{
341341
$this->authenticatedAs(new User());
342342

@@ -411,7 +411,7 @@ public function testOrganizationActionRendersUnregisteredModulesOnly()
411411
$this->dispatch($url);
412412

413413
$this->assertControllerName(Controller\ModuleController::class);
414-
$this->assertActionName('organization');
414+
$this->assertActionName('list');
415415
$this->assertResponseStatusCode(Http\Response::STATUS_CODE_200);
416416

417417
/* @var Mvc\Application $application */

0 commit comments

Comments
 (0)