- Switch do actual DI - Add some more parameters for needed dependencies - Create a factory interface, implement it in PageCommandFactory and add wiring for it. - Add new unit tests for DeletePage; unfortunately, this requires conditionally disabling some code during tests due to dependencies on legacy code that hasn't been migrated yet. I believe that these temporary hacks are acceptable, since they allow us to use real unit tests immediately. - Adjust WikiPageDbTest: the two logging tests were identical as of Ie0d9da2c8d273c93301921e1e108d9ffb381b8a5; and then the logging part could just be part of the "main" test. - Add integration tests for DeletePage. For now, these are all copying their WikiPageDbTest counterpart. More tests will be added soon™. Bug: T288758 Change-Id: I2fb79ed905ce621cb87f0658983d97148948da28
18 lines
319 B
PHP
18 lines
319 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Page;
|
|
|
|
use MediaWiki\Permissions\Authority;
|
|
|
|
/**
|
|
* @since 1.37
|
|
*/
|
|
interface DeletePageFactory {
|
|
|
|
/**
|
|
* @param ProperPageIdentity $page
|
|
* @param Authority $deleter
|
|
* @return DeletePage
|
|
*/
|
|
public function newDeletePage( ProperPageIdentity $page, Authority $deleter ): DeletePage;
|
|
}
|