10 $resultWrapper = $this->getMockBuilder(
'ResultWrapper' )
11 ->disableOriginalConstructor();
13 $resultWrapper = $resultWrapper->getMock();
14 $resultWrapper->expects( $this->atLeastOnce() )
16 ->will( $this->returnValue( $row ) );
17 $resultWrapper->expects( $this->
any() )
19 ->will( $this->returnValue( $numRows ) );
21 return $resultWrapper;
25 $row =
new stdClass();
26 $row->page_namespace = $namespace;
44 $this->assertEquals( $resultWrapper, $object->res );
45 $this->assertSame( 0, $object->key );
46 $this->assertEquals( $row, $object->current );
60 $this->assertEquals( $resultWrapper, $object->res );
61 $this->assertSame( 0, $object->key );
62 $this->assertInstanceOf(
'Title', $object->current );
63 $this->assertEquals( $namespace, $object->current->mNamespace );
64 $this->assertEquals(
$title, $object->current->mTextform );
84 $this->assertEquals( $numRows, $object->count() );
95 $this->assertInstanceOf(
'Title', $object->current() );
96 $this->assertEquals( $namespace, $object->current->mNamespace );
97 $this->assertEquals(
$title, $object->current->mTextform );
113 $this->assertEquals( $expected, $object->valid() );