HumHub Documentation (unofficial)

CommonPluginManagerTrait

Trait for testing plugin managers for v2-v3 compatibility

To use this trait:

  • implement the getPluginManager() method to return your plugin manager
  • implement the getV2InvalidPluginException() method to return the class validatePlugin() throws under v2

Table of Contents

Methods

aliasProvider()  : array<string|int, mixed>
testInstanceOfMatches()  : mixed
testLoadingInvalidElementRaisesException()  : mixed
testPluginAliasesResolve()  : mixed
testRegisteringInvalidElementRaisesException()  : mixed
testShareByDefaultAndSharedByDefault()  : mixed
getInstanceOf()  : string
Returns the value the instanceOf property has been set to
getPluginManager()  : AbstractPluginManager
Returns the plugin manager to test
getServiceNotFoundException()  : string
getV2InvalidPluginException()  : mixed
Returns the FQCN of the exception thrown under v2 by `validatePlugin()`

Methods

aliasProvider()

public aliasProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

testPluginAliasesResolve()

public testPluginAliasesResolve(string $alias, string $expected) : mixed
Parameters
$alias : string
$expected : string
Tags
dataProvider

aliasProvider

testRegisteringInvalidElementRaisesException()

public testRegisteringInvalidElementRaisesException() : mixed

getInstanceOf()

Returns the value the instanceOf property has been set to

protected abstract getInstanceOf() : string
Return values
string

getV2InvalidPluginException()

Returns the FQCN of the exception thrown under v2 by `validatePlugin()`

protected abstract getV2InvalidPluginException() : mixed

        
On this page

Search results