private $appData;
public function setUp() {
- $this->request = $this->getMockBuilder(IRequest::class)->getMock();
- $this->config = $this->getMockBuilder(IConfig::class)->getMock();
- $this->template = $this->getMockBuilder(ThemingDefaults::class)
- ->disableOriginalConstructor()->getMock();
- $this->timeFactory = $this->getMockBuilder(ITimeFactory::class)
- ->disableOriginalConstructor()
- ->getMock();
- $this->l10n = $this->getMockBuilder(L10N::class)->getMock();
- $this->rootFolder = $this->getMockBuilder(IRootFolder::class)->getMock();
- $this->appManager = $this->getMockBuilder(IAppManager::class)->getMock();
+ $this->request = $this->createMock(IRequest::class);
+ $this->config = $this->createMock(IConfig::class);
+ $this->template = $this->createMock(ThemingDefaults::class);
+ $this->timeFactory = $this->createMock(ITimeFactory::class);
+ $this->l10n = $this->createMock(L10N::class);
+ $this->rootFolder = $this->createMock(IRootFolder::class);
+ $this->appManager = $this->createMock(IAppManager::class);
$this->util = new Util($this->config, $this->rootFolder, $this->appManager);
$this->timeFactory->expects($this->any())
->method('getTime')
->willReturn(123);
$this->tempManager = \OC::$server->getTempManager();
- $this->appData = $this->getMockBuilder(IAppData::class)->getMock();
+ $this->appData = $this->createMock(IAppData::class);
$this->themingController = new ThemingController(
'theming',
->willReturn('Saved');
- $file = $this->getMockBuilder(ISimpleFile::class)
- ->disableOriginalConstructor()
- ->getMock();
- $folder = $this->getMockBuilder(ISimpleFolder::class)
- ->disableOriginalConstructor()
- ->getMock();
+ $file = $this->createMock(ISimpleFile::class);
+ $folder = $this->createMock(ISimpleFolder::class);
$this->appData
->expects($this->once())
->method('getFolder')
->with('Saved')
->willReturn('Saved');
- $file = $this->getMockBuilder(ISimpleFile::class)
- ->disableOriginalConstructor()
- ->getMock();
- $folder = $this->getMockBuilder(ISimpleFolder::class)
- ->disableOriginalConstructor()
- ->getMock();
+ $file = $this->createMock(ISimpleFile::class);
+ $folder = $this->createMock(ISimpleFolder::class);
$this->appData
->expects($this->once())
->method('getFolder')
->with('Unsupported image type')
->willReturn('Unsupported image type');
- $folder = $this->getMockBuilder(ISimpleFolder::class)
- ->disableOriginalConstructor()
- ->getMock();
+ $folder = $this->createMock(ISimpleFolder::class);
$this->appData
->expects($this->once())
->method('getFolder')
}
public function testGetLogo() {
- $file = $this->getMockBuilder(ISimpleFile::class)
- ->disableOriginalConstructor()
- ->getMock();
- $folder = $this->getMockBuilder(ISimpleFolder::class)
- ->disableOriginalConstructor()
- ->getMock();
+ $file = $this->createMock(ISimpleFile::class);
+ $folder = $this->createMock(ISimpleFolder::class);
$this->appData
->expects($this->once())
->method('getFolder')
}
public function testGetLoginBackground() {
- $file = $this->getMockBuilder(ISimpleFile::class)
- ->disableOriginalConstructor()
- ->getMock();
- $folder = $this->getMockBuilder(ISimpleFolder::class)
- ->disableOriginalConstructor()
- ->getMock();
+ $file = $this->createMock(ISimpleFile::class);
+ $folder = $this->createMock(ISimpleFolder::class);
$this->appData
->expects($this->once())
->method('getFolder')
public function setUp() {
parent::setUp();
- $this->appData = $this->getMockBuilder(IAppData::class)->getMock();
- $this->rootFolder = $this->getMockBuilder(IRootFolder::class)->getMock();
+ $this->appData = $this->createMock(IAppData::class);
+ $this->rootFolder = $this->createMock(IRootFolder::class);
$this->repairStep = new ThemingImages($this->appData, $this->rootFolder);
- $this->imageFolder = $this->getMockBuilder(ISimpleFolder::class)->getMock();
- $this->output = $this->getMockBuilder(IOutput::class)->getMock();
+ $this->imageFolder = $this->createMock(ISimpleFolder::class);
+ $this->output = $this->createMock(IOutput::class);
}
public function testGetName() {
}
public function testRunLogo() {
- $oldFile = $this->getMockBuilder(File::class)->getMock();
- $newFile = $this->getMockBuilder(ISimpleFile::class)->getMock();
+ $oldFile = $this->createMock(File::class);
+ $newFile = $this->createMock(ISimpleFile::class);
$this->appData->expects($this->once())
->method('newFolder')
}
public function testRunBackground() {
- $oldFile = $this->getMockBuilder(File::class)->getMock();
- $newFile = $this->getMockBuilder(ISimpleFile::class)->getMock();
+ $oldFile = $this->createMock(File::class);
+ $newFile = $this->createMock(ISimpleFile::class);
$this->appData->expects($this->once())
->method('newFolder')