Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Tests\Utils\Mock\IteratorMockBuilder Class Reference
Collaboration diagram for SMW\Tests\Utils\Mock\IteratorMockBuilder:
Collaboration graph
[legend]

Public Member Functions

 setClass ($iteratorClass)
 
 with (array $items)
 
 setMethods (array $methods)
 
 incrementInvokedCounterBy ($num)
 
 getMockForIterator ()
 
 getLastCounter ()
 

Detailed Description

Convenience mock builder for Iterator classes semantic-mediawiki

GNU GPL v2+

Since
2.0
Author
mwjames

Member Function Documentation

SMW\Tests\Utils\Mock\IteratorMockBuilder::getLastCounter ( )
Since
2.0
Returns
integer
SMW\Tests\Utils\Mock\IteratorMockBuilder::getMockForIterator ( )
Since
2.0
Returns
PHPUnit_Framework_MockObject_MockObject
Exceptions
RuntimeException
SMW\Tests\Utils\Mock\IteratorMockBuilder::incrementInvokedCounterBy (   $num)
Note
When other methods called before the actual current/next then set the counter to ensure the starting point matches the expected InvokeCount.
Since
2.5
Parameters
integer$num
Returns
IteratorMockBuilder
SMW\Tests\Utils\Mock\IteratorMockBuilder::setClass (   $iteratorClass)
Since
2.0
Parameters
string$iteratorClass
Returns
IteratorMockBuilder
SMW\Tests\Utils\Mock\IteratorMockBuilder::setMethods ( array  $methods)
Since
2.5
Parameters
array$methods
Returns
IteratorMockBuilder
SMW\Tests\Utils\Mock\IteratorMockBuilder::with ( array  $items)
Since
2.0
Parameters
array$items
Returns
IteratorMockBuilder

The documentation for this class was generated from the following file: