X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fphpunit%2Fincludes%2Fdeferred%2FLinksUpdateTest.php;h=1f9d29e26c3efd0ab8a23300411e25624c64d35b;hb=af80076034fb734d652eb043c523c1d8df974e51;hp=cd3ddfa8e82708a4388d37813b2b7ca42b4d6ef9;hpb=243a466018d24415de27815cfae995865c45a66a;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/deferred/LinksUpdateTest.php b/tests/phpunit/includes/deferred/LinksUpdateTest.php index cd3ddfa8e8..1f9d29e26c 100644 --- a/tests/phpunit/includes/deferred/LinksUpdateTest.php +++ b/tests/phpunit/includes/deferred/LinksUpdateTest.php @@ -430,4 +430,18 @@ class LinksUpdateTest extends MediaWikiLangTestCase { $queueGroup->ack( $job ); } } + + public function testIsRecursive() { + list( $title, $po ) = $this->makeTitleAndParserOutput( 'Test', 1 ); + $linksUpdate = new LinksUpdate( $title, $po ); + $this->assertTrue( $linksUpdate->isRecursive(), 'LinksUpdate is recursive by default' ); + + $linksUpdate = new LinksUpdate( $title, $po, true ); + $this->assertTrue( $linksUpdate->isRecursive(), + 'LinksUpdate is recursive when asked to be recursive' ); + + $linksUpdate = new LinksUpdate( $title, $po, false ); + $this->assertFalse( $linksUpdate->isRecursive(), + 'LinksUpdate is not recursive when asked to be not recursive' ); + } }