Created
June 16, 2016 14:02
-
-
Save mergeweb/6bb0fc75b28d777a702362afa9fba81b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function testViewAuthenticated() | |
{ | |
$this->session([ | |
'Auth' => [ | |
'User' => [ | |
'permissions' => [ | |
[ | |
'label' => 'ViewInvoices' | |
] | |
], | |
'roles' => [] | |
] | |
] | |
]); | |
$invoicesController = | |
$this->getMockBuilder('App\Controller\Account\InvoicesController') | |
->setMethods($this->_getMethodsExcluding(['isAuthorized', '__construct', 'initialize'])) | |
->getMock(); | |
$invoicesController->expects($this->once()) | |
->method('view'); | |
$this->get('account/invoices/view/1'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment