[197] r395@phpspec (orig r197): padraic.brady | 2008-01-14 15:21:37 -0700

0 views
Skip to first unread message

nor...@domain51.com

unread,
Jan 14, 2008, 5:25:03 PM1/14/08
to phpspec...@googlegroups.com
Revision
197
Author
phpspec
Date
2008-01-14 15:25:03 -0700 (Mon, 14 Jan 2008)

Log Message

 r395@phpspec (orig r197):  padraic.brady | 2008-01-14 15:21:37 -0700
 * Completed GET interface to Zend Framework MVC
 * Basic setup looks pretty firm right now

Modified Paths

Property Changed

Diff

Property changes:


Name: svk:merge
   - d6e91ea2-e33a-0410-98df-1d493bd67c58:/:196
   + d6e91ea2-e33a-0410-98df-1d493bd67c58:/:197

Modified: branches/zend/specs/ContextZendSpec.php (196 => 197)


--- branches/zend/specs/ContextZendSpec.php	2008-01-14 22:21:02 UTC (rev 196)
+++ branches/zend/specs/ContextZendSpec.php	2008-01-14 22:25:03 UTC (rev 197)
@@ -58,22 +58,30 @@
 
     public function itShouldFormulateAndDispatchGetRequest()
     {
-        PHPSpec_Context_Zend::addModuleDirectory(
-            dirname(__FILE__) . DIRECTORY_SEPARATOR . '_modules'
+        PHPSpec_Context_Zend::addControllerDirectory(
+            dirname(__FILE__)
+            . DIRECTORY_SEPARATOR . '_zend'
+            . DIRECTORY_SEPARATOR . 'application'
+            . DIRECTORY_SEPARATOR . 'controllers'
         );
         $context = new DescribeFooController;
         $context->beforeEach();
-        $context->setController('phpspec');
-        $response = $context->get('pget', array('text', 'hello1'));
-        $this->spec($response)->should->be('hello1');
+        $context->setController('index');
+        $response = $context->get('index');
+        $this->spec($response)->should->match("/This is Index/");
     }
 
     public function after()
     {
         PHPSpec_Context_Zend::clearModuleDirectories();
+        PHPSpec_Context_Zend::clearControllerDirectories();
     }
 }
 
+/**
+ * DescribeFooController is just an entry point. The actual controller
+ * is manually set so we don't need subclass bloat for specs
+ */
 class DescribeFooController extends PHPSpec_Context_Zend
 {
 }
\ No newline at end of file
Reply all
Reply to author
Forward
0 new messages