Example #1
0
 public function testBasicGetMapAfterSet()
 {
     $o = new ProcessorFixture();
     $oMap = new ModuleMap(__FILE__, '\\A.*\\Z');
     $o->setMap($oMap);
     $this->assertSame($oMap, $o->getMap());
 }
Example #2
0
 public function testSetLocalVars()
 {
     $o = new ProcessorFixture();
     $fixtureValue = $o->getLocalVars();
     $localValue = array('test2' => 'grrr');
     $o->setLocalVars($localValue, true);
     $this->assertEquals(array_merge($fixtureValue, $localValue), $o->getLocalVars());
 }
Example #3
0
 public function testBasicDelegateRequest()
 {
     $o = new ProcessorFixture();
     $sValue = 'test';
     $oHttpRequest = new PopulatedRequest();
     $oNewProcessor = new ProcessorFixture();
     $oNewProcessor->return = $sValue;
     $sMapPath = VSC_FIXTURE_PATH . 'config' . DIRECTORY_SEPARATOR . 'map.php';
     vsc::getEnv()->setDispatcher(new RwDispatcher());
     vsc::getEnv()->getDispatcher()->loadSiteMap($sMapPath);
     $this->assertEquals($sValue, $o->delegateRequest($oHttpRequest, $oNewProcessor));
 }
Example #4
0
 public function testGetLocalVars()
 {
     $o = new ProcessorFixture();
     $fixtureValue = array('test' => null);
     $this->assertEquals($fixtureValue, $o->getLocalVars());
 }