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();
43 $this->assertEquals( $resultWrapper, $object->res );
44 $this->assertSame( 0, $object->key );
45 $this->assertEquals( $row, $object->current );
58 $this->assertEquals( $resultWrapper, $object->res );
59 $this->assertSame( 0, $object->key );
60 $this->assertInstanceOf(
'User', $object->current );
61 $this->assertEquals(
$username, $object->current->mName );
81 $this->assertEquals( $numRows, $object->count() );
91 $this->assertInstanceOf(
'User', $object->current() );
92 $this->assertEquals(
$username, $object->current()->mName );
108 $this->assertEquals( $expected, $object->valid() );