Skip to content

Commit

Permalink
SampleTest.php
Browse files Browse the repository at this point in the history
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.
32 changes: 32 additions & 0 deletions tests/application/SampleTest.php
@@ -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);
}

}

0 comments on commit 81c5d1a

Please sign in to comment.