[ Index ]

PHP Cross Reference of DokuWiki




/_test/core/ -> DokuWikiTest.php (summary)

(no description)

File Size: 237 lines (8 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

PHPUnit_Framework_TestCase:: (1 method):

DokuWikiTest:: (6 methods):

Class: PHPUnit_Framework_TestCase  - X-Ref

phpunit 5/6 compatibility

setExpectedException($class, $message=null)   X-Ref
setExpectedException is deprecated in PHPUnit 6

param: string $class
param: null|string $message

Class: DokuWikiTest  - X-Ref

Helper class to provide basic functionality for tests

setUpBeforeClass()   X-Ref
Setup the data directory

This is ran before each test class

setUp()   X-Ref
Reset the DokuWiki environment before each test run. Makes sure loaded config,
language and plugins are correct.

return: void

setupDataDir()   X-Ref
Reinitialize the data directory for this class run

setupConfDir()   X-Ref
Reinitialize the conf directory for this class run

waitForTick($init = false)   X-Ref
Waits until a new second has passed

The very first call will return immeadiately, proceeding calls will return
only after at least 1 second after the last call has passed.

When passing $init=true it will not return immeadiately but use the current
second as initialization. It might still return faster than a second.

param: bool $init wait from now on, not from last time
return: int new timestamp

callInaccessibleMethod($obj, $func, array $args)   X-Ref
Allow for testing inaccessible methods (private or protected)

This makes it easier to test protected methods without needing to create intermediate
classes inheriting and changing the access.

param: object $obj Object in which to call the method
param: string $func The method to call
param: array $args The arguments to call the method with
link: https://stackoverflow.com/a/8702347/172068
return: mixed