13 $factoryConstructor =
new ReflectionMethod(
'ParserFactory',
'__construct' );
16 $this->
assertSame( $instanceConstructor->getNumberOfParameters() - 1,
17 $factoryConstructor->getNumberOfParameters(),
18 'Parser and ParserFactory constructors have an inconsistent number of parameters. ' .
19 'Did you add a parameter to one and not the other?' );
23 $factoryConstructor =
new ReflectionMethod(
'ParserFactory',
'__construct' );
25 foreach ( $factoryConstructor->getParameters() as $param ) {
27 if (
$type ===
'array' ) {
28 $val = [
'porcupines will tell me your secrets' . count( $mocks ) ];
33 $val =
'I will de-quill them first' . count( $mocks );
35 $this->fail(
"Unrecognized parameter type $type in ParserFactory constructor" );
44 $prop->setAccessible(
true );
45 foreach ( $mocks as $idx => $mock ) {
46 if ( $prop->getValue(
$parser ) === $mock ) {
47 unset( $mocks[$idx] );
52 $this->
assertCount( 0, $mocks,
'Not all arguments to the ParserFactory constructor were ' .
53 'found in Parser member variables' );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
testConstructorArgNum()
For backwards compatibility, all parameters to the parser constructor are optional and default to the...
testAllArgumentsWerePassed()
see documentation in includes Linker php for Linker::makeImageLink or false for current used if you return false $parser
This code would result in ircNotify being run twice when an article is and once for brion Hooks can return three possible true was required This is the default since MediaWiki *some string