Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/UnitTestsBeforeDatabaseTeardown

From mediawiki.org
<Manual:Hooks
UnitTestsBeforeDatabaseTeardown
Available fromversion 1.30.0
Called right before MediaWiki's test infrastructure begins tearing down tables for unit tests.
Define function:
publicstaticfunctiononUnitTestsBeforeDatabaseTeardown(){...}
Attach hook:Inextension.json:
{"Hooks":{"UnitTestsBeforeDatabaseTeardown":"MediaWiki\\Extension\\MyExtension\\Hooks::onUnitTestsBeforeDatabaseTeardown"}}
Called from:File(s):../tests/phpunit/MediaWikiIntegrationTestCase.php
Interface:UnitTestsBeforeDatabaseTeardownHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:UnitTestsBeforeDatabaseTeardown extensions.


Notes

[edit]

Use this hook to clean up your test database after all tests are run from changes introduced e.g. viaUnitTestsAfterDatabaseSetup.

Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/UnitTestsBeforeDatabaseTeardown&oldid=3295657"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp