21 $title = Title::makeTitle( $ns, $dbKey );
23 foreach ( $pages as $page ) {
24 list( $bns, $bdbkey ) = $page;
27 $bpage->doEditContent( $content,
"test" );
30 $title->getBacklinkCache()->clear();
33 $title->getBacklinkCache()->getNumLinks(
'pagelinks' ),
34 'Correct number of backlinks'
39 $extraParams =
$job->getRootJobParams();
42 $this->assertEquals( 10, count( $jobs ),
'Correct number of sub-jobs' );
43 $this->assertEquals( $pages[0], current( $jobs[0]->params[
'pages'] ),
44 'First job is leaf job with proper title' );
45 $this->assertEquals( $pages[8], current( $jobs[8]->params[
'pages'] ),
46 'Last leaf job is leaf job with proper title' );
47 $this->assertEquals(
true, isset( $jobs[9]->params[
'recursive'] ),
48 'Last job is recursive sub-job' );
49 $this->assertEquals(
true, $jobs[9]->params[
'recursive'],
50 'Last job is recursive sub-job' );
51 $this->assertEquals(
true, is_array( $jobs[9]->params[
'range'] ),
52 'Last job is recursive sub-job' );
53 $this->assertEquals( $title->getPrefixedText(), $jobs[0]->getTitle()->getPrefixedText(),
54 'Base job title retainend in leaf job' );
55 $this->assertEquals( $title->getPrefixedText(), $jobs[9]->getTitle()->getPrefixedText(),
56 'Base job title retainend recursive sub-job' );
57 $this->assertEquals( $extraParams[
'rootJobSignature'], $jobs[0]->params[
'rootJobSignature'],
58 'Leaf job has root params' );
59 $this->assertEquals( $extraParams[
'rootJobSignature'], $jobs[9]->params[
'rootJobSignature'],
60 'Recursive sub-job has root params' );
66 [
'params' => $extraParams ]
69 $this->assertEquals( 10, count( $jobs2 ),
'Correct number of sub-jobs' );
70 $this->assertEquals( $pages[9], current( $jobs2[0]->params[
'pages'] ),
71 'First job is leaf job with proper title' );
72 $this->assertEquals( $pages[17], current( $jobs2[8]->params[
'pages'] ),
73 'Last leaf job is leaf job with proper title' );
74 $this->assertEquals(
true, isset( $jobs2[9]->params[
'recursive'] ),
75 'Last job is recursive sub-job' );
76 $this->assertEquals(
true, $jobs2[9]->params[
'recursive'],
77 'Last job is recursive sub-job' );
78 $this->assertEquals(
true, is_array( $jobs2[9]->params[
'range'] ),
79 'Last job is recursive sub-job' );
80 $this->assertEquals( $extraParams[
'rootJobSignature'], $jobs2[0]->params[
'rootJobSignature'],
81 'Leaf job has root params' );
82 $this->assertEquals( $extraParams[
'rootJobSignature'], $jobs2[9]->params[
'rootJobSignature'],
83 'Recursive sub-job has root params' );
89 [
'params' => $extraParams ]
92 $this->assertEquals( 2, count( $jobs3 ),
'Correct number of sub-jobs' );
93 $this->assertEquals( $pages[18], current( $jobs3[0]->params[
'pages'] ),
94 'First job is leaf job with proper title' );
95 $this->assertEquals( $extraParams[
'rootJobSignature'], $jobs3[0]->params[
'rootJobSignature'],
96 'Leaf job has root params' );
97 $this->assertEquals( $pages[19], current( $jobs3[1]->params[
'pages'] ),
98 'Last job is leaf job with proper title' );
99 $this->assertEquals( $extraParams[
'rootJobSignature'], $jobs3[1]->params[
'rootJobSignature'],
100 'Last leaf job has root params' );