Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dennis-fedco
Last active December 31, 2015 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dennis-fedco/7950074 to your computer and use it in GitHub Desktop.
Save dennis-fedco/7950074 to your computer and use it in GitHub Desktop.
<?php
namespace FedcoUserTest;
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase;
class IndexControllerTest extends AbstractHttpControllerTestCase
{
public function setUp()
{
$this->setApplicationConfig(include '/config/application.config.php');
parent::setUp();
}
public function testIndexActionCanBeAccessed() //fails
{
$this->dispatch('/user/machinist');
$this->assertResponseStatusCode(200); //gives me actual code is "403", because I am not authenticated
// ...
//questions:
//* How do I authenticate?
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment