Merge pull request #14502 from owncloud/failing-mysql-master-tests
Failing mysql master tests
This commit is contained in:
commit
adc986f3e4
|
@ -36,7 +36,7 @@ use OC\URLGenerator;
|
||||||
/**
|
/**
|
||||||
* @package OCA\Files_Sharing\Controllers
|
* @package OCA\Files_Sharing\Controllers
|
||||||
*/
|
*/
|
||||||
class ShareControllerTest extends \PHPUnit_Framework_TestCase {
|
class ShareControllerTest extends \Test\TestCase {
|
||||||
|
|
||||||
/** @var IAppContainer */
|
/** @var IAppContainer */
|
||||||
private $container;
|
private $container;
|
||||||
|
|
|
@ -65,7 +65,7 @@ abstract class TestCase extends \Test\TestCase {
|
||||||
|
|
||||||
// reset backend
|
// reset backend
|
||||||
\OC_User::clearBackends();
|
\OC_User::clearBackends();
|
||||||
\OC_User::useBackend('database');
|
\OC_Group::clearBackends();
|
||||||
|
|
||||||
// clear share hooks
|
// clear share hooks
|
||||||
\OC_Hook::clear('OCP\\Share');
|
\OC_Hook::clear('OCP\\Share');
|
||||||
|
@ -130,6 +130,12 @@ abstract class TestCase extends \Test\TestCase {
|
||||||
\OC_User::setUserId('');
|
\OC_User::setUserId('');
|
||||||
Filesystem::tearDown();
|
Filesystem::tearDown();
|
||||||
|
|
||||||
|
// reset backend
|
||||||
|
\OC_User::clearBackends();
|
||||||
|
\OC_User::useBackend('database');
|
||||||
|
\OC_Group::clearBackends();
|
||||||
|
\OC_Group::useBackend(new \OC_Group_Database());
|
||||||
|
|
||||||
parent::tearDownAfterClass();
|
parent::tearDownAfterClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,14 @@ class GroupsTest extends TestCase {
|
||||||
|
|
||||||
$this->assertInstanceOf('OC_OCS_Result', $result);
|
$this->assertInstanceOf('OC_OCS_Result', $result);
|
||||||
$this->assertTrue($result->succeeded());
|
$this->assertTrue($result->succeeded());
|
||||||
$this->assertEquals(array('users' => $users), $result->getData());
|
$this->assertEquals(1, sizeof($result->getData()), 'Asserting the result data array only has the "users" key');
|
||||||
|
$this->assertArrayHasKey('users', $result->getData());
|
||||||
|
$resultData = $result->getData();
|
||||||
|
$resultData = $resultData['users'];
|
||||||
|
|
||||||
|
sort($users);
|
||||||
|
sort($resultData);
|
||||||
|
$this->assertEquals($users, $resultData);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,6 +106,7 @@ class Manager extends PublicEmitter implements IGroupManager {
|
||||||
public function clearBackends() {
|
public function clearBackends() {
|
||||||
$this->backends = array();
|
$this->backends = array();
|
||||||
$this->cachedGroups = array();
|
$this->cachedGroups = array();
|
||||||
|
$this->cachedUserGroups = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,6 @@ namespace Test\OC\Connector\Sabre;
|
||||||
|
|
||||||
use OC\Files\FileInfo;
|
use OC\Files\FileInfo;
|
||||||
use OC\Connector\Sabre\Directory;
|
use OC\Connector\Sabre\Directory;
|
||||||
use PHPUnit_Framework_TestCase;
|
|
||||||
|
|
||||||
class TestDoubleFileView extends \OC\Files\View {
|
class TestDoubleFileView extends \OC\Files\View {
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,6 @@ namespace OCA\ObjectStore\Tests\Unit;
|
||||||
use OC\Files\ObjectStore\ObjectStoreStorage;
|
use OC\Files\ObjectStore\ObjectStoreStorage;
|
||||||
use OC\Files\ObjectStore\Swift as ObjectStoreToTest;
|
use OC\Files\ObjectStore\Swift as ObjectStoreToTest;
|
||||||
|
|
||||||
use PHPUnit_Framework_TestCase;
|
|
||||||
|
|
||||||
//class Swift extends PHPUnit_Framework_TestCase {
|
//class Swift extends PHPUnit_Framework_TestCase {
|
||||||
class Swift extends \Test\Files\Storage\Storage {
|
class Swift extends \Test\Files\Storage\Storage {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue