コード例 #1
0
 /**
  * Tests WindFrontController->registeComponent()
  * 
  */
 public function testRegisteComponent()
 {
     $httprequest = new WindHttpRequest();
     $httprequest->setAttribute(123, 'long');
     $httpresponse = new WindHttpResponse();
     $httpresponse->setData(123, 'long');
     $aaa = new stdClass();
     $aaa->long = 123;
     $this->WindFrontController->registeComponent($aaa, 'aaa');
     $this->WindFrontController->registeComponent($httpresponse, 'response');
     $this->WindFrontController->registeComponent($httprequest, 'request');
     $this->WindFrontController->createApplication();
     $this->assertEquals(123, Wind::getApp()->getRequest()->getAttribute('long'));
     $this->assertEquals(123, Wind::getApp()->getResponse()->getData('long'));
     $this->assertEquals(123, Wind::getApp()->getComponent('aaa')->long);
 }