Semantic MediaWiki and related extensions
|
Public Member Functions | |
__construct (MockObjectRepository $repository=null) | |
registerRepository (MockObjectRepository $repository) | |
newObject ( $objectName, $objectArguments=[]) | |
getInvokedMethods () | |
newRandomString ( $length=10, $prefix=null) | |
hasValue ( $key) | |
setValue ( $key, $default=null) | |
setCallback ( $key, $default=null) | |
Protected Member Functions | |
findRepositoryForObject ( $objectName) | |
setupConfiguration ( $config) | |
Protected Attributes | |
$configuration | |
$repository = [] | |
MockObject builder provides methods that are being used by the mock repository to define and create a mock object
$title = new MockObjectBuilder() $title->newObject( 'Foo', array( 'Bar' => ... ) )
SMW SMWExtension
GNU GPL v2+
SMW\Tests\Utils\Mock\MockObjectBuilder::__construct | ( | MockObjectRepository | $repository = null | ) |
MockObjectRepository | null | $repository |
|
protected |
$objectName |
SMW\Tests\Utils\Mock\MockObjectBuilder::getInvokedMethods | ( | ) |
Returns invoked configuration keys
SMW\Tests\Utils\Mock\MockObjectBuilder::hasValue | ( | $key | ) |
Whether the configuration is known
$key |
SMW\Tests\Utils\Mock\MockObjectBuilder::newObject | ( | $objectName, | |
$objectArguments = [] |
|||
) |
Helper method that stores configuration settings
$objectName | |
$objectArguments |
SMW\Tests\Utils\Mock\MockObjectBuilder::newRandomString | ( | $length = 10 , |
|
$prefix = null |
|||
) |
Helper method that returns a random string
$length | |
$prefix | identify a specific random string during testing |
SMW\Tests\Utils\Mock\MockObjectBuilder::registerRepository | ( | MockObjectRepository | $repository | ) |
MockObjectRepository | $repository |
SMW\Tests\Utils\Mock\MockObjectBuilder::setCallback | ( | $key, | |
$default = null |
|||
) |
Determine callback function otherwise return simple value
$key | |
$default |
|
protected |
$config |
SMW\Tests\Utils\Mock\MockObjectBuilder::setValue | ( | $key, | |
$default = null |
|||
) |
Sets value
$key | |
$default |