Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding example test for logical and controller/routing tests
- Loading branch information
Michael Kimsal
authored and
Michael Kimsal
committed
Jun 20, 2010
1 parent
5d8de24
commit 81c5d1a
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,32 @@ | |||
<?php | |||
|
|||
class SampleTest extends Zend_Test_PHPUnit_ControllerTestCase | |||
{ | |||
|
|||
public function setUp() | |||
{ | |||
$this->bootstrap = new Zend_Application('testing', | |||
APPLICATION_PATH."/configs/application.ini"); | |||
parent::setUp(); | |||
} | |||
|
|||
public function tearDown() { | |||
$this->resetRequest(); | |||
$this->resetResponse(); | |||
parent::tearDown(); | |||
} | |||
|
|||
public function testRun() | |||
{ | |||
$this->assertTrue(1==1); | |||
} | |||
|
|||
public function testRoutingRequest() { | |||
$this->_request->setParam("foo", "bar"); | |||
$this->dispatch('/index/index'); | |||
$this->assertResponseCode('200'); | |||
$body = $this->getResponse()->getBody(); | |||
$this->assertTrue(stripos($body, "zfkit")!==false); | |||
} | |||
|
|||
} |