Permalink
Browse files

SampleTest.php

adding example test for logical and controller/routing tests
  • Loading branch information...
1 parent 5d8de24 commit 81c5d1aec53e76c662aa8ae38884252cd98dc609 Michael Kimsal committed Jun 20, 2010
Showing with 32 additions and 0 deletions.
  1. +32 −0 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.