Created
January 30, 2014 11:38
-
-
Save gpfiel/8706816 to your computer and use it in GitHub Desktop.
How cna i know if it is inside the form posting?
This file contains hidden or 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 | |
use Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase; | |
use \CodeGuy; | |
class UC001LoginTest extends AbstractHttpControllerTestCase | |
{ | |
protected function setUp() | |
{ | |
$this->setApplicationConfig( | |
include 'C:/wamp/www/extranet/config/application.config.php' | |
); | |
parent::setUp(); | |
} | |
protected function tearDown() | |
{ | |
} | |
public function testAcaoLogin() | |
{ | |
$this->dispatch('/login'); | |
$this->assertResponseStatusCode(200); | |
$this->assertModuleName('Application'); | |
$this->assertControllerName('Application\Controller\Login'); | |
$this->assertControllerClass('LoginController'); | |
$this->assertMatchedRouteName('login'); | |
$dadosLogin = array("email" => "[email protected]", "senha" => "123456"); | |
$this->dispatch('/login', 'POST', $dadosLogin); | |
$this->assertResponseStatusCode(200); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment