protected function setUp() { $this->source = new SourceMock(123); $this->sourceManager = $this->getMockBuilder(CachedSourceManager::class)->disableOriginalConstructor()->setMethods(['findSourceByFeed'])->getMock(); $this->sourceManager->expects($this->any())->method('findSourceByFeed')->will($this->returnValue($this->source)); }