/** * @dataProvider provideBooleans */ public function testIsWatched($returnValue) { $title = Title::newFromText('SomeTitle'); $timestamp = null; $checkRights = 0; /** @var User|PHPUnit_Framework_MockObject_MockObject $user */ $user = $this->getMock(User::class); $user->expects($this->once())->method('isWatched')->with($title, $checkRights)->will($this->returnValue($returnValue)); $item = new WatchedItem($user, $title, $timestamp, $checkRights); $this->assertEquals($returnValue, $item->isWatched()); }