mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-12-25 21:12:56 +00:00
9293e2d5ca
Bug: T270875 Change-Id: Ieb29603cde24a1c52829c12ae431eca09ba37bf9
29 lines
600 B
PHP
29 lines
600 B
PHP
<?php
|
|
|
|
namespace Cite\Tests\Unit;
|
|
|
|
use Cite\Hooks\CiteHooks;
|
|
use Title;
|
|
|
|
/**
|
|
* @covers \Cite\Hooks\CiteHooks
|
|
*
|
|
* @license GPL-2.0-or-later
|
|
*/
|
|
class CiteHooksUnitTest extends \MediaWikiUnitTestCase {
|
|
|
|
public function testOnContentHandlerDefaultModelFor() {
|
|
$title = $this->createMock( Title::class );
|
|
$title->method( 'inNamespace' )
|
|
->willReturn( true );
|
|
$title->method( 'getText' )
|
|
->willReturn( 'Cite-tool-definition.json' );
|
|
|
|
$citeHooks = new CiteHooks();
|
|
$citeHooks->onContentHandlerDefaultModelFor( $title, $model );
|
|
|
|
$this->assertSame( CONTENT_MODEL_JSON, $model );
|
|
}
|
|
|
|
}
|