Fixed caldav tests and metadata 2

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2018-03-05 10:10:05 +01:00 committed by Joas Schilling
parent 2609b30df0
commit ae369e870d
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
2 changed files with 10 additions and 4 deletions

View File

@ -29,6 +29,7 @@ use OCP\Activity\IProvider;
use OCP\IL10N;
use OCP\IUser;
use OCP\IUserManager;
use OCP\IGroupManager;
use Test\TestCase;
class BaseTest extends TestCase {
@ -36,15 +37,20 @@ class BaseTest extends TestCase {
/** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
protected $userManager;
/** @var IGroupManager|\PHPUnit_Framework_MockObject_MockObject */
protected $groupManager;
/** @var IProvider|Base|\PHPUnit_Framework_MockObject_MockObject */
protected $provider;
protected function setUp() {
parent::setUp();
$this->userManager = $this->createMock(IUserManager::class);
$this->groupManager = $this->createMock(IGroupManager::class);
$this->provider = $this->getMockBuilder(Base::class)
->setConstructorArgs([
$this->userManager
$this->userManager,
$this->groupManager
])
->setMethods(['parse'])
->getMock();

View File

@ -56,9 +56,9 @@ class MetaDataTest extends \Test\TestCase {
$group->expects($this->exactly(9))
->method('getGID')
->will($this->onConsecutiveCalls(
'admin', 'admin', 'admin',
'g2', 'g2', 'g2',
'g3', 'g3', 'g3'));
'admin', 'admin',
'g2', 'g2',
'g3', 'g3'));
$group->expects($this->exactly($countCallCount))
->method('count')