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

Commit

Permalink
Merge pull request #468 from localheinz/fix/organization-vs-list
Browse files Browse the repository at this point in the history
Fix: organizationAction() should be listAction()
  • Loading branch information
Ocramius committed Mar 6, 2015
2 parents 8516bea + 50d622a commit 2c99bf4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion module/ZfModule/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
'owner' => '[a-zA-Z][a-zA-Z0-9_-]*',
],
'defaults' => [
'action' => 'organization',
'action' => 'list',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function indexAction()
return $viewModel;
}

public function organizationAction()
public function listAction()
{
if (!$this->zfcUserAuthentication()->hasIdentity()) {
return $this->redirect()->toRoute('zfcuser/login');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public function testIndexActionRendersUnregisteredModulesOnly()
$this->assertSame($unregisteredModule, $viewVariable[0]);
}

public function testOrganizationActionRedirectsIfNotAuthenticated()
public function testListActionRedirectsIfNotAuthenticated()
{
$this->notAuthenticated();

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

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

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

public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesWhenNoOwnerIsSpecified()
public function testListActionFetches100MostRecentlyUpdatedRepositoriesWhenNoOwnerIsSpecified()
{
$this->authenticatedAs(new User());

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

$this->assertControllerName(Controller\ModuleController::class);
$this->assertActionName('organization');
$this->assertActionName('list');
$this->assertResponseStatusCode(Http\Response::STATUS_CODE_200);
}

/**
* @dataProvider providerInvalidVendor
* @param $vendor
* @param string $vendor
*/
public function testOrganizationActionDoesNotMatchOnInvalidVendor($vendor)
public function testListActionDoesNotMatchOnInvalidVendor($vendor)
{
$this->authenticatedAs(new User());

Expand Down Expand Up @@ -289,7 +289,7 @@ public function providerInvalidVendor()
];
}

public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesWithOwnerSpecified()
public function testListActionFetches100MostRecentlyUpdatedRepositoriesWithOwnerSpecified()
{
$this->authenticatedAs(new User());

Expand Down Expand Up @@ -332,11 +332,11 @@ public function testOrganizationActionFetches100MostRecentlyUpdatedRepositoriesW
$this->dispatch($url);

$this->assertControllerName(Controller\ModuleController::class);
$this->assertActionName('organization');
$this->assertActionName('list');
$this->assertResponseStatusCode(Http\Response::STATUS_CODE_200);
}

public function testOrganizationActionRendersUnregisteredModulesOnly()
public function testListActionRendersUnregisteredModulesOnly()
{
$this->authenticatedAs(new User());

Expand Down Expand Up @@ -411,7 +411,7 @@ public function testOrganizationActionRendersUnregisteredModulesOnly()
$this->dispatch($url);

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

/* @var Mvc\Application $application */
Expand Down

0 comments on commit 2c99bf4

Please sign in to comment.