rootFolder = $this->createMock(IRootFolder::class); $this->systemConfig = $this->createMock(SystemConfig::class); $this->factory = new Factory($this->rootFolder, $this->systemConfig); } public function testGet(): void { $this->rootFolder->expects($this->never()) ->method($this->anything()); $this->systemConfig->expects($this->never()) ->method($this->anything()); $this->factory->get('foo'); } }