Changeset 287

Show
Ignore:
Timestamp:
02/21/07 17:19:14 (2 years ago)
Author:
mikey
Message:

added expectation test for page elements (every page element has to be called exactly one time)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/test/php/net/stubbles/websites/xml/stubXMLProcessorTestCase.php

    r279 r287  
    135135        $this->mockRequest->setReturnValue('getValidatedValue', null); 
    136136        $this->mockPageFactory->expectOnce('getPage', array('conf/index')); 
     137        $response = $this->xmlProcessor->getResponse(); 
    137138        $pageElement1 = new MockstubPageElement(); 
    138139        $pageElement1->setReturnValue('process', 'foo'); 
     140        $pageElement1->expectOnce('process', array($this->mockRequest, $this->mockSession, $response)); 
    139141        $pageElement2 = new MockstubPageElement(); 
    140142        $pageElement2->setReturnValue('process', 'bar'); 
     143        $pageElement2->expectOnce('process', array($this->mockRequest, $this->mockSession, $response)); 
    141144        $this->mockPage->setReturnValue('getElements', array('foo' => $pageElement1, 'bar' => $pageElement2)); 
    142145        $this->mockXMLStreamWriter->expectOnce('writeStartElement', array('document'));