],
$this->isType( 'string' )
)
- ->will( $this->returnValue( 12 ) );
+ ->will( $this->returnValue( '12' ) );
$mockCache = $this->getMockCache();
$mockCache->expects( $this->never() )->method( 'get' );
],
$this->isType( 'string' )
)
- ->will( $this->returnValue( 7 ) );
+ ->will( $this->returnValue( '7' ) );
$mockCache = $this->getMockCache();
$mockCache->expects( $this->never() )->method( 'get' );
$mockDb = $this->getMockDb();
$dbResult = [
- $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => 0, 'watchers' => 100 ] ),
- $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => 0, 'watchers' => 300 ] ),
- $this->getFakeRow( [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => 1, 'watchers' => 500 ]
+ $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => '0', 'watchers' => '100' ] ),
+ $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => '0', 'watchers' => '300' ] ),
+ $this->getFakeRow( [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => '1', 'watchers' => '500' ]
),
];
$mockDb->expects( $this->once() )
$mockDb = $this->getMockDb();
$dbResult = [
- $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => 0, 'watchers' => 100 ] ),
- $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => 0, 'watchers' => 300 ] ),
- $this->getFakeRow( [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => 1, 'watchers' => 500 ]
+ $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => '0', 'watchers' => '100' ] ),
+ $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => '0', 'watchers' => '300' ] ),
+ $this->getFakeRow( [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => '1', 'watchers' => '500' ]
),
];
$mockDb->expects( $this->once() )
],
$this->isType( 'string' )
)
- ->will( $this->returnValue( 7 ) );
+ ->will( $this->returnValue( '7' ) );
$mockDb->expects( $this->exactly( 1 ) )
->method( 'addQuotes' )
->will( $this->returnCallback( function ( $value ) {
];
$dbResult = [
- $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => 0, 'watchers' => 100 ] ),
- $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => 0, 'watchers' => 300 ] ),
- $this->getFakeRow( [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => 1, 'watchers' => 500 ] ),
+ $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => '0', 'watchers' => '100' ] ),
+ $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => '0', 'watchers' => '300' ] ),
+ $this->getFakeRow(
+ [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => '1', 'watchers' => '500' ]
+ ),
];
$mockDb = $this->getMockDb();
$mockDb->expects( $this->exactly( 2 * 3 ) )
];
$dbResult = [
- $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => 0, 'watchers' => 100 ] ),
- $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => 0, 'watchers' => 300 ] ),
- $this->getFakeRow( [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => 1, 'watchers' => 500 ] ),
+ $this->getFakeRow( [ 'wl_title' => 'SomeDbKey', 'wl_namespace' => '0', 'watchers' => '100' ] ),
+ $this->getFakeRow( [ 'wl_title' => 'OtherDbKey', 'wl_namespace' => '0', 'watchers' => '300' ] ),
$this->getFakeRow(
- [ 'wl_title' => 'SomeNotExisitingDbKey', 'wl_namespace' => 0, 'watchers' => 100 ]
+ [ 'wl_title' => 'AnotherDbKey', 'wl_namespace' => '1', 'watchers' => '500' ]
),
$this->getFakeRow(
- [ 'wl_title' => 'OtherNotExisitingDbKey', 'wl_namespace' => 0, 'watchers' => 200 ]
+ [ 'wl_title' => 'SomeNotExisitingDbKey', 'wl_namespace' => '0', 'watchers' => '100' ]
+ ),
+ $this->getFakeRow(
+ [ 'wl_title' => 'OtherNotExisitingDbKey', 'wl_namespace' => '0', 'watchers' => '200' ]
),
];
$mockDb = $this->getMockDb();
],
$this->isType( 'string' )
)
- ->will( $this->returnValue( 9 ) );
+ ->will( $this->returnValue( '9' ) );
$mockCache = $this->getMockCache();
$mockCache->expects( $this->never() )->method( 'set' );
$this->isType( 'string' ),
[ 'LIMIT' => 50 ]
)
- ->will( $this->returnValue( 50 ) );
+ ->will( $this->returnValue( '50' ) );
$mockCache = $this->getMockCache();
$mockCache->expects( $this->never() )->method( 'set' );
$this->isType( 'string' ),
[ 'LIMIT' => 50 ]
)
- ->will( $this->returnValue( 9 ) );
+ ->will( $this->returnValue( '9' ) );
$mockCache = $this->getMockCache();
$mockCache->expects( $this->never() )->method( 'set' );
public function testDuplicateEntry_somethingToDuplicate() {
$fakeRows = [
- $this->getFakeRow( [ 'wl_user' => 1, 'wl_notificationtimestamp' => '20151212010101' ] ),
- $this->getFakeRow( [ 'wl_user' => 2, 'wl_notificationtimestamp' => null ] ),
+ $this->getFakeRow( [ 'wl_user' => '1', 'wl_notificationtimestamp' => '20151212010101' ] ),
+ $this->getFakeRow( [ 'wl_user' => '2', 'wl_notificationtimestamp' => null ] ),
];
$mockDb = $this->getMockDb();
LinkTarget $newTarget
) {
$fakeRows = [
- $this->getFakeRow( [ 'wl_user' => 1, 'wl_notificationtimestamp' => '20151212010101' ] ),
+ $this->getFakeRow( [ 'wl_user' => '1', 'wl_notificationtimestamp' => '20151212010101' ] ),
];
$mockDb = $this->getMockDb();
$mockDb = $this->getMockDb();
$dbResult = [
$this->getFakeRow( [
- 'wl_namespace' => 0,
+ 'wl_namespace' => '0',
'wl_title' => 'SomeDbKey',
'wl_notificationtimestamp' => '20151212010101',
] ),
$this->getFakeRow(
[
- 'wl_namespace' => 1,
+ 'wl_namespace' => '1',
'wl_title' => 'AnotherDbKey',
'wl_notificationtimestamp' => null,
]
)
->will( $this->returnValue( [
$this->getFakeRow(
- [ 'wl_namespace' => 1, 'wl_title' => 'AnotherDbKey', 'wl_notificationtimestamp' => null, ]
+ [ 'wl_namespace' => '1', 'wl_title' => 'AnotherDbKey', 'wl_notificationtimestamp' => null, ]
)
] ) );