Changeset 315
- Timestamp:
- 03/01/07 16:43:45 (1 year ago)
- Files:
-
- trunk/docroot/xml.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisProcessor.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/processors/stubAbstractProcessor.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/processors/stubDefaultProcessorResolver.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/processors/stubProcessor.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/processors/stubProcessorResolver.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/processors/stubSimpleProcessorResolver.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/websites/stubFrontController.php (modified) (5 diffs)
- trunk/src/main/php/net/stubbles/websites/xml/stubXMLPreInterceptor.php (modified) (4 diffs)
- trunk/src/main/php/net/stubbles/websites/xml/stubXMLProcessor.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/websites/memphis/stubMemphisProcessorTestCase.php (modified) (2 diffs)
- trunk/src/test/php/net/stubbles/websites/processors/stubDefaultProcessorResolverTestCase.php (modified) (8 diffs)
- trunk/src/test/php/net/stubbles/websites/processors/stubSimpleProcessorResolverTestCase.php (modified) (5 diffs)
- trunk/src/test/php/net/stubbles/websites/xml/stubXMLProcessorTestCase.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docroot/xml.php
r309 r315 9 9 'net.stubbles.ipo.request.filters.stubAbstractFilter', 10 10 'net.stubbles.ipo.request.stubRequestValueError', 11 'net.stubbles.ipo.session.stubPHPSession' 11 'net.stubbles.ipo.session.stubPHPSession', 12 'net.stubbles.ipo.response.stubBaseResponse' 12 13 ); 13 14 class TestFilter extends stubAbstractFilter … … 30 31 unlink($file->getPathname()); 31 32 } 32 $request = new stubWebRequest(); 33 $session = new stubPHPSession('stubSID'); 33 34 $request = new stubWebRequest(); 35 $session = new stubPHPSession('stubSID'); 36 $response = new stubBaseResponse(); 34 37 $preInterceptor = new stubXMLPreInterceptor(); 35 38 $preInterceptor->setRequest($request); 36 39 $preInterceptor->setSession($session); 40 $preInterceptor->setResponse($response); 37 41 $preInterceptor->preProcess(); 38 42 if ($request->isCancelled() == true) { 43 $response->send(); 39 44 return; 40 45 } 41 46 $request->getFilteredValue(new TestFilter(), 'bar'); 42 47 $pageFactory = new stubXJConfPageFactory(stubXJConfLoader::getInstance()); 43 $processor = new stubXMLProcessor($request, $session, $ pageFactory);48 $processor = new stubXMLProcessor($request, $session, $response, $pageFactory); 44 49 $postInterceptor = new stubXMLPagePostInterceptor(); 45 50 $response = $processor->process()->getResponse(); trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisProcessor.php
r301 r315 24 24 * @param stubRequest $request the current request 25 25 * @param stubSession $session the current session 26 * @param stubResponse $response the current response 26 27 * @param stubPageFactory $pageFactory page factory to use to read the page configuration 27 28 */ 28 public function __construct(stubRequest $request, stubSession $session, stub PageFactory $pageFactory)29 public function __construct(stubRequest $request, stubSession $session, stubResponse $response, stubPageFactory $pageFactory) 29 30 { 30 parent::__construct($request, $session, $pageFactory); 31 $this->response = new stubBaseResponse(); 31 parent::__construct($request, $session, $response, $pageFactory); 32 32 } 33 33 trunk/src/main/php/net/stubbles/websites/processors/stubAbstractProcessor.php
r280 r315 46 46 * @param stubRequest $request the current request 47 47 * @param stubSession $session the current session 48 * @param stubResponse $response the current response 48 49 * @param stubPageFactory $pageFactory page factory to use to read the page configuration 49 50 */ 50 public function __construct(stubRequest $request, stubSession $session, stub PageFactory $pageFactory)51 public function __construct(stubRequest $request, stubSession $session, stubResponse $response, stubPageFactory $pageFactory) 51 52 { 52 53 $this->request = $request; 53 54 $this->session = $session; 55 $this->response = $response; 54 56 $this->pageFactory = $pageFactory; 55 57 } … … 74 76 * returns the created response 75 77 * 76 * @return null78 * @return stubResponse 77 79 */ 78 80 public function getResponse() trunk/src/main/php/net/stubbles/websites/processors/stubDefaultProcessorResolver.php
r284 r315 72 72 * resolves the request and creates the appropriate processor 73 73 * 74 * @param stubRequest $request the current request 75 * @param stubSession $session the current session 74 * @param stubRequest $request the current request 75 * @param stubSession $session the current session 76 * @param stubResponse $response the current response 76 77 * @return stubProcessor 77 78 * @throws stubProcessorException 78 79 */ 79 public function resolve(stubRequest $request, stubSession $session )80 public function resolve(stubRequest $request, stubSession $session, stubResponse $response) 80 81 { 81 82 if (count($this->processors) == 0) { … … 98 99 stubClassLoader::load($this->processors[$paramValue]); 99 100 $className = stubClassLoader::getNonQualifiedClassName($this->processors[$paramValue]); 100 $processor = new $className($request, $session, $ this->pageFactory);101 $processor = new $className($request, $session, $response, $this->pageFactory); 101 102 if (($processor instanceof stubProcessor) == false) { 102 103 throw new stubProcessorException($this->processors[$paramValue] . ' is not an instance of ' . stubClassLoader::getFullQualifiedClassName('stubProcessor')); trunk/src/main/php/net/stubbles/websites/processors/stubProcessor.php
r279 r315 25 25 * @param stubRequest $request the current request 26 26 * @param stubSession $session the current session 27 * @param stubResponse $response the current response 27 28 * @param stubPageFactory $pageFactory page factory to use to read the page configuration 28 29 */ 29 #public function __construct(stubRequest $request, stubSession $session, stubPageFactory $pageFactory);30 #public function __construct(stubRequest $request, stubSession $session, , stubResponse $response, stubPageFactory $pageFactory); 30 31 31 32 /** trunk/src/main/php/net/stubbles/websites/processors/stubProcessorResolver.php
r279 r315 32 32 * resolves the request and creates the appropriate processor 33 33 * 34 * @param stubRequest $request the current request 35 * @param stubSession $session the current session 34 * @param stubRequest $request the current request 35 * @param stubSession $session the current session 36 * @param stubResponse $response the current response 36 37 * @return stubProcessor 37 38 * @throws stubProcessorException 38 39 */ 39 public function resolve(stubRequest $request, stubSession $session );40 public function resolve(stubRequest $request, stubSession $session, stubResponse $response); 40 41 } 41 42 ?> trunk/src/main/php/net/stubbles/websites/processors/stubSimpleProcessorResolver.php
r283 r315 53 53 * resolves the request and creates the appropriate processor 54 54 * 55 * @param stubRequest $request the current request 56 * @param stubSession $session the current session 55 * @param stubRequest $request the current request 56 * @param stubSession $session the current session 57 * @param stubResponse $response the current response 57 58 * @return stubProcessor 58 59 * @throws stubProcessorException 59 60 */ 60 public function resolve(stubRequest $request, stubSession $session )61 public function resolve(stubRequest $request, stubSession $session, stubResponse $response) 61 62 { 62 63 if (null == $this->processor) { … … 66 67 stubClassLoader::load($this->processor); 67 68 $className = stubClassLoader::getNonQualifiedClassName($this->processor); 68 $processor = new $className($request, $session, $ this->pageFactory);69 $processor = new $className($request, $session, $response, $this->pageFactory); 69 70 if (($processor instanceof stubProcessor) == false) { 70 71 throw new stubProcessorException($this->processor . ' is not an instance of ' . stubClassLoader::getFullQualifiedClassName('stubProcessor')); trunk/src/main/php/net/stubbles/websites/stubFrontController.php
r311 r315 12 12 'net.stubbles.ipo.session.stubPHPSession', 13 13 'net.stubbles.util.stubRegistry', 14 'net.stubbles.util.xjconf.stubXJConfLoader' 15 ); 16 XJConfLoader::load('DefinitionParser', 17 'XmlParser', 18 'XJConfClassLoader' 14 'net.stubbles.util.xjconf.xjconf' 19 15 ); 20 16 /** … … 63 59 */ 64 60 protected $session; 61 /** 62 * response container 63 * 64 * @var stubResponse 65 */ 66 protected $response; 65 67 66 68 /** 67 69 * constructor 70 * 71 * @throws stubXJConfException 68 72 */ 69 73 public function __construct() 70 74 { 71 $tagParser = new DefinitionParser(array('http://stubbles.net/ipo/interceptors' => stubXJConfLoader::getInstance(), 72 'http://stubbles.net/websites' => stubXJConfLoader::getInstance() 73 ) 74 ); 75 $defs = $tagParser->parse(stubFactory::getResourceURI('xjconf/interceptors.xml')); 76 $xmlParser = new XmlParser(); 77 $xmlParser->setTagDefinitions($defs); 78 try { 79 $xmlParser->parse(stubConfig::getConfigPath() . '/xml/interceptors.xml'); 80 } catch (XJConfException $xjce) { 81 throw new stubException($xjce->getMessage()); 82 } 75 $xjconf = new stubXJConfFacade(array('http://stubbles.net/ipo/interceptors' => stubXJConfLoader::getInstance(), 76 'http://stubbles.net/websites' => stubXJConfLoader::getInstance() 77 ) 78 ); 79 $xjconf->setDefinitionFile(stubFactory::getResourceURI('xjconf/interceptors.xml')); 80 $xjconf->parse(stubConfig::getConfigPath() . '/xml/interceptors.xml'); 81 $this->preInterceptors = $xjconf->getConfigValue('preInterceptors'); 82 $this->postInterceptors = $xjconf->getConfigValue('postInterceptors'); 83 83 84 $this->preInterceptors = $xmlParser->getConfigValue('preInterceptors'); 85 $this->postInterceptors = $xmlParser->getConfigValue('postInterceptors'); 86 87 $defs = $tagParser->parse(stubFactory::getResourceURI('xjconf/processors.xml')); 88 $xmlParser = new XmlParser(); 89 $xmlParser->setTagDefinitions($defs); 90 try { 91 $xmlParser->parse(stubConfig::getConfigPath() . '/xml/processors.xml'); 92 } catch (XJConfException $xjce) { 93 throw new stubException($xjce->getMessage()); 94 } 95 $this->resolver = $xmlParser->getConfigValue('resolver'); 84 $xjconf->setDefinitionFile(stubFactory::getResourceURI('xjconf/processors.xml')); 85 $xjconf->parse(stubConfig::getConfigPath() . '/xml/processors.xml'); 86 $this->resolver = $xjconf->getConfigValue('resolver'); 96 87 97 88 $this->injectionMap = new stubInjectionMap(); … … 100 91 stubClassLoader::load($fqClassName); 101 92 $className = stubClassLoader::getNonQualifiedClassName($fqClassName); 102 $ request= new $className();103 if (($ request instanceof stubRequest) == false) {93 $this->request = new $className(); 94 if (($this->request instanceof stubRequest) == false) { 104 95 throw new stubException('Configured request class is not an instance of stubRequest.'); 105 96 } 106 107 $this->injectionMap->addInjection('stubRequest', $request);108 97 } else { 109 $this-> injectionMap->addInjection('stubRequest', new stubWebRequest());98 $this->request = new stubWebRequest(); 110 99 } 100 $this->injectionMap->addInjection('stubRequest', $this->request); 111 101 112 102 if (stubRegistry::hasConfig('net.stubbles.ipo.session.class') == true) { … … 114 104 stubClassLoader::load($fqClassName); 115 105 $className = stubClassLoader::getNonQualifiedClassName($fqClassName); 116 $ session = new $className();117 if (($ session instanceof stubSession) == false) {106 $this->session = new $className(); 107 if (($this->session instanceof stubSession) == false) { 118 108 throw new stubException('Configured session class is not an instance of stubSession.'); 119 109 } 120 121 $this->injectionMap->addInjection('stubSession', $session);122 110 } else { 123 $this-> injectionMap->addInjection('stubSession', new stubPHPSession());111 $this->session = new stubPHPSession(); 124 112 } 113 $this->injectionMap->addInjection('stubSession', $this->session); 114 115 $this->response = new stubBaseResponse(); 116 $this->injectionMap->addInjection('stubResponse', $this->response); 125 117 } 126 118 127 /**128 * processes all preinterceptors129 */130 protected function startUp()131 {132 foreach ($this->preInterceptors as $preInterceptor) {133 stubInjectAnnotation::factory($this->injectionMap, $preInterceptor);134 $preInterceptor->preProcess();135 }136 }137 138 /**139 * processes all postinterceptors140 */141 protected function tearDown()142 {143 foreach ($this->postInterceptors as $postInterceptor) {144 stubInjectAnnotation::factory($this->injectionMap, $postInterceptor);145 $postInterceptor->postProcess();146 }147 }148 149 119 /** 150 120 * does the whole processing … … 152 122 public function process() 153 123 { 154 $this->startUp(); 155 $response = $this->resolver->resolve($this->request, $this->session)->process()->getResponse(); 156 $this->injectionMap->addInjection('stubResponse', $response); 157 $this->tearDown(); 158 $response->send(); 124 foreach ($this->preInterceptors as $preInterceptor) { 125 stubInjectAnnotation::factory($this->injectionMap, $preInterceptor); 126 $preInterceptor->preProcess(); 127 if ($this->request->isCancelled() == true) { 128 $this->response->send(); 129 return; 130 } 131 } 132 133 $this->response = $this->resolver->resolve($this->request, $this->session, $this->response)->process()->getResponse(); 134 $this->injectionMap->addInjection('stubResponse', $this->response); 135 136 foreach ($this->postInterceptors as $postInterceptor) { 137 stubInjectAnnotation::factory($this->injectionMap, $postInterceptor); 138 $postInterceptor->postProcess(); 139 if ($this->request->isCancelled() == true) { 140 break; 141 } 142 } 143 144 $this->response->send(); 159 145 } 160 146 } trunk/src/main/php/net/stubbles/websites/xml/stubXMLPreInterceptor.php
r295 r315 19 19 * @package stubbles 20 20 * @subpackage websites_xml 21 * @Inject(stubRequest:stubSession )21 * @Inject(stubRequest:stubSession:stubResponse) 22 22 */ 23 23 class stubXMLPreInterceptor extends stubBaseObject implements stubPreInterceptor … … 35 35 */ 36 36 protected $session; 37 /** 38 * the response instance 39 * 40 * @var stubResponse 41 */ 42 protected $response; 37 43 38 44 /** … … 57 63 58 64 /** 65 * the response instance to use 66 * 67 * @param stubResponse $request 68 */ 69 public function setResponse(stubResponse $response) 70 { 71 $this->response = $response; 72 } 73 74 /** 59 75 * does the preprocessing stuff 60 76 */ … … 62 78 { 63 79 if ($this->request->hasValue('showLastRequestXML') == true && $this->session->isNew() == false) { 64 $response = new stubBaseResponse(); 65 $response->addHeader('Content-type', 'text/xml'); 66 $response->write($this->session->getValue('net.stubbles.websites.lastRequestResponseData')); 80 $this->response->addHeader('Content-type', 'text/xml'); 81 $this->response->write($this->session->getValue('net.stubbles.websites.lastRequestResponseData')); 67 82 $this->request->cancel(); 68 $response->send();69 83 } 70 84 } trunk/src/main/php/net/stubbles/websites/xml/stubXMLProcessor.php
r301 r315 28 28 * @param stubRequest $request the current request 29 29 * @param stubSession $session the current session 30 * @param stubResponse $response the current response 30 31 * @param stubPageFactory $pageFactory page factory to use to read the page configuration 31 32 */ 32 public function __construct(stubRequest $request, stubSession $session, stub PageFactory $pageFactory)33 public function __construct(stubRequest $request, stubSession $session, stubResponse $response, stubPageFactory $pageFactory) 33 34 { 34 parent::__construct($request, $session, $pageFactory);35 $this->response = new stubXMLResponse(new stubBaseResponse());35 $response = new stubXMLResponse($response); 36 parent::__construct($request, $session, $response, $pageFactory); 36 37 } 37 38 trunk/src/test/php/net/stubbles/websites/memphis/stubMemphisProcessorTestCase.php
r300 r315 40 40 protected $mockSession; 41 41 /** 42 * mocked response instance 43 * 44 * @var SimpleMock 45 */ 46 protected $mockResponse; 47 /** 42 48 * mocked page factory instance 43 49 * … … 59 65 $this->mockRequest = new MockstubRequest(); 60 66 $this->mockSession = new MockstubSession(); 67 $this->mockResponse = new MockstubResponse(); 61 68 $this->mockPageFactory = new MockstubPageFactory(); 62 $this->memphisProcessor = new stubMemphisProcessor($this->mockRequest, $this->mockSession, $this->mock PageFactory);69 $this->memphisProcessor = new stubMemphisProcessor($this->mockRequest, $this->mockSession, $this->mockResponse, $this->mockPageFactory); 63 70 $this->mockPage = new MockstubPage(); 64 71 $this->mockPageFactory->setReturnValue('getPage', $this->mockPage); trunk/src/test/php/net/stubbles/websites/processors/stubDefaultProcessorResolverTestCase.php
r284 r315 38 38 protected $mockRequest; 39 39 /** 40 * mocked response instance 41 * 42 * @var SimpleMock 43 */ 44 protected $mockResponse; 45 /** 40 46 * mocked session to use 41 47 * … … 54 60 $this->defaultProcessorResolver->setPageFactory($this->mockPageFactory); 55 61 56 $this->mockRequest = new MockstubRequest(); 57 $this->mockSession = new MockstubSession(); 62 $this->mockRequest = new MockstubRequest(); 63 $this->mockSession = new MockstubSession(); 64 $this->mockResponse = new MockstubResponse(); 58 65 } 59 66 … … 76 83 $this->addProcessors(); 77 84 $this->mockRequest->setReturnValue('hasValue', false); 78 $processor = $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession );85 $processor = $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 79 86 $this->assertIsA($processor, 'FooProcessor'); 80 87 $request = $processor->getRequest(); … … 94 101 $this->mockRequest->setReturnValue('hasValue', true); 95 102 $this->mockRequest->setReturnValue('getValidatedValue', 'bar'); 96 $processor = $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession );103 $processor = $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 97 104 $this->assertIsA($processor, 'BarProcessor'); 98 105 $request = $processor->getRequest(); … … 112 119 $this->mockRequest->setReturnValue('hasValue', true); 113 120 $this->mockRequest->setReturnValue('getValidatedValue', null); 114 $processor = $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession );121 $processor = $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 115 122 $this->assertIsA($processor, 'FooProcessor'); 116 123 } … … 125 132 $this->mockRequest->setReturnValue('getValidatedValue', 'baz'); 126 133 $this->expectException('stubProcessorException'); 127 $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession );134 $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 128 135 } 129 136 … … 134 141 { 135 142 $this->expectException('stubProcessorException'); 136 $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession );143 $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 137 144 } 138 145 … … 145 152 $this->defaultProcessorResolver->setDefaultProcessor('bar'); 146 153 $this->expectException('stubProcessorException'); 147 $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession );154 $this->defaultProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 148 155 } 149 156 } trunk/src/test/php/net/stubbles/websites/processors/stubSimpleProcessorResolverTestCase.php
r285 r315 43 43 */ 44 44 protected $mockSession; 45 /** 46 * mocked response instance 47 * 48 * @var SimpleMock 49 */ 50 protected $mockResponse; 45 51 46 52 /** … … 55 61 $this->simpleProcessorResolver->setPageFactory($this->mockPageFactory); 56 62 57 $this->mockRequest = new MockstubRequest(); 58 $this->mockSession = new MockstubSession(); 63 $this->mockRequest = new MockstubRequest(); 64 $this->mockSession = new MockstubSession(); 65 $this->mockResponse = new MockstubResponse(); 59 66 } 60 67 … … 65 72 { 66 73 $this->simpleProcessorResolver->setProcessor('_test.FooProcessor'); 67 $processor = $this->simpleProcessorResolver->resolve($this->mockRequest, $this->mockSession );74 $processor = $this->simpleProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 68 75 $this->assertIsA($processor, 'FooProcessor'); 69 76 $request = $processor->getRequest(); … … 82 89 $this->simpleProcessorResolver->setProcessor('_test.BazProcessor'); 83 90 $this->expectException('stubProcessorException'); 84 $this->simpleProcessorResolver->resolve($this->mockRequest, $this->mockSession );91 $this->simpleProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 85 92 } 86 93 … … 91 98 { 92 99 $this->expectException('stubProcessorException'); 93 $this->simpleProcessorResolver->resolve($this->mockRequest, $this->mockSession );100 $this->simpleProcessorResolver->resolve($this->mockRequest, $this->mockSession, $this->mockResponse); 94 101 } 95 102 } trunk/src/test/php/net/stubbles/websites/xml/stubXMLProcessorTestCase.php
r297 r315 66 66 protected $mockSession; 67 67 /** 68 * mocked response instance 69 * 70 * @var SimpleMock 71 */ 72 protected $mockResponse; 73 /** 68 74 * mocked page factory instance 69 75 * … … 98 104 $this->mockRequest->setReturnValue('getValueErrors', array()); 99 105 $this->mockSession = new MockstubSession(); 106 $this->mockResponse = new MockstubResponse(); 100 107 $this->mockPageFactory = new MockstubPageFactory(); 101 $this->xmlProcessor = new PartialMockstubXMLProcessor($this->mockRequest, $this->mockSession, $this->mock PageFactory);108 $this->xmlProcessor = new PartialMockstubXMLProcessor($this->mockRequest, $this->mockSession, $this->mockResponse, $this->mockPageFactory); 102 109 $this->mockXMLStreamWriter = new MockstubXMLStreamWriter(); 103 110 $this->mockXMLSerializer = new MockstubXMLSerializer(); … … 117 124 $this->mockXMLStreamWriter->expectCallcount('writeStartElement', 4); 118 125 $this->mockXMLStreamWriter->expectCallcount('writeEndElement', 4); 119 $this->mockXMLStreamWriter->setReturnValue('asXML', '<document />');120 126 $this->mockXMLSerializer->expectNever('serialize'); 121 127 $return = $this->xmlProcessor->process(); … … 123 129 $response = $this->xmlProcessor->getResponse(); 124 130 $this->assertIsA($response, 'stubResponse'); 125 $this->assertEqual($response->getData(), '<document />');126 131 } 127 132 … … 147 152 $this->mockXMLStreamWriter->expectCallcount('writeStartElement', 4); 148 153 $this->mockXMLStreamWriter->expectCallcount('writeEndElement', 4); 149 $this->mockXMLStreamWriter->setReturnValue('asXML', '<document><foo>foo</foo><bar>bar</bar></document>');150 154 $this->mockXMLSerializer->expectAt(0, 'serialize', array('foo', $this->mockXMLStreamWriter, array(stubXMLSerializer::OPT_ROOT_TAG => 'foo'))); 151 155 $this->mockXMLSerializer->expectAt(1, 'serialize', array('bar', $this->mockXMLStreamWriter, array(stubXMLSerializer::OPT_ROOT_TAG => 'bar'))); … … 154 158 $response = $this->xmlProcessor->getResponse(); 155 159 $this->assertIsA($response, 'stubResponse'); 156 $this->assertEqual($response->getData(), '<document><foo>foo</foo><bar>bar</bar></document>');157 160 } 158 161
