Merge pull request #26275 from nextcloud/backport/26265/stable20
[stable20] Fix casing of core test folder, bring back missing tests
This commit is contained in:
commit
5f9f997a33
|
@ -9,6 +9,7 @@ use OCP\Files\IRootFolder;
|
||||||
use OCP\Files\Node;
|
use OCP\Files\Node;
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
|
use OCP\Lock\ILockingProvider;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
use Symfony\Component\Console\Formatter\OutputFormatterInterface;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
@ -43,7 +44,13 @@ class RepairTest extends TestCase {
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->iniGetWrapper = $this->getMockBuilder(IniGetWrapper::class)
|
$this->iniGetWrapper = $this->getMockBuilder(IniGetWrapper::class)
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->repair = new Repair($this->config, $this->rootFolder, $this->logger, $this->iniGetWrapper);
|
$this->repair = new Repair(
|
||||||
|
$this->config,
|
||||||
|
$this->rootFolder,
|
||||||
|
$this->logger,
|
||||||
|
$this->iniGetWrapper,
|
||||||
|
$this->createMock(ILockingProvider::class)
|
||||||
|
);
|
||||||
$this->input = $this->getMockBuilder(InputInterface::class)
|
$this->input = $this->getMockBuilder(InputInterface::class)
|
||||||
->getMock();
|
->getMock();
|
||||||
$this->input->expects($this->any())
|
$this->input->expects($this->any())
|
||||||
|
|
|
@ -440,6 +440,7 @@ class LoginControllerTest extends TestCase {
|
||||||
->with('core.login.showLoginForm', [
|
->with('core.login.showLoginForm', [
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'redirect_url' => '/apps/files',
|
'redirect_url' => '/apps/files',
|
||||||
|
'direct' => 1,
|
||||||
])
|
])
|
||||||
->willReturn($loginPageUrl);
|
->willReturn($loginPageUrl);
|
||||||
$expected = new \OCP\AppFramework\Http\RedirectResponse($loginPageUrl);
|
$expected = new \OCP\AppFramework\Http\RedirectResponse($loginPageUrl);
|
||||||
|
@ -597,6 +598,7 @@ class LoginControllerTest extends TestCase {
|
||||||
->with('core.login.showLoginForm', [
|
->with('core.login.showLoginForm', [
|
||||||
'user' => 'john@doe.com',
|
'user' => 'john@doe.com',
|
||||||
'redirect_url' => '/apps/files',
|
'redirect_url' => '/apps/files',
|
||||||
|
'direct' => 1,
|
||||||
])
|
])
|
||||||
->willReturn($loginPageUrl);
|
->willReturn($loginPageUrl);
|
||||||
$expected = new \OCP\AppFramework\Http\RedirectResponse($loginPageUrl);
|
$expected = new \OCP\AppFramework\Http\RedirectResponse($loginPageUrl);
|
||||||
|
|
|
@ -52,7 +52,7 @@ class CleanPreviewsBackgroundJobTest extends TestCase {
|
||||||
/** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
|
/** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
|
||||||
private $userManager;
|
private $userManager;
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->rootFolder = $this->createMock(IRootFolder::class);
|
$this->rootFolder = $this->createMock(IRootFolder::class);
|
||||||
|
|
|
@ -46,7 +46,7 @@ class CleanPreviewsTest extends TestCase {
|
||||||
/** @var CleanPreviews */
|
/** @var CleanPreviews */
|
||||||
private $repair;
|
private $repair;
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->jobList = $this->createMock(IJobList::class);
|
$this->jobList = $this->createMock(IJobList::class);
|
||||||
|
|
|
@ -41,7 +41,7 @@ class InstallCoreBundleTest extends TestCase {
|
||||||
/** @var InstallCoreBundle */
|
/** @var InstallCoreBundle */
|
||||||
private $installCoreBundle;
|
private $installCoreBundle;
|
||||||
|
|
||||||
public function setUp() {
|
public function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->bundleFetcher = $this->createMock(BundleFetcher::class);
|
$this->bundleFetcher = $this->createMock(BundleFetcher::class);
|
||||||
$this->config = $this->createMock(IConfig::class);
|
$this->config = $this->createMock(IConfig::class);
|
||||||
|
|
|
@ -43,7 +43,7 @@ class UpdateLanguageCodesTest extends TestCase {
|
||||||
/** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
|
/** @var IConfig | \PHPUnit_Framework_MockObject_MockObject */
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp(): void {
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->connection = \OC::$server->getDatabaseConnection();
|
$this->connection = \OC::$server->getDatabaseConnection();
|
||||||
|
@ -86,6 +86,7 @@ class UpdateLanguageCodesTest extends TestCase {
|
||||||
->from('preferences')
|
->from('preferences')
|
||||||
->where($qb->expr()->eq('appid', $qb->createNamedParameter('core')))
|
->where($qb->expr()->eq('appid', $qb->createNamedParameter('core')))
|
||||||
->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter('lang')))
|
->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter('lang')))
|
||||||
|
->orderBy('userid')
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$rows = $result->fetchAll();
|
$rows = $result->fetchAll();
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
>
|
>
|
||||||
<testsuite name='ownCloud'>
|
<testsuite name='ownCloud'>
|
||||||
<directory suffix='.php'>lib/</directory>
|
<directory suffix='.php'>lib/</directory>
|
||||||
<directory suffix='.php'>core/</directory>
|
<directory suffix='.php'>Core/</directory>
|
||||||
<directory suffix='.php'>ocs-provider/</directory>
|
<directory suffix='.php'>Test/</directory>
|
||||||
<file>apps.php</file>
|
<file>apps.php</file>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
<!-- filters for code coverage -->
|
<!-- filters for code coverage -->
|
||||||
|
@ -32,4 +32,3 @@
|
||||||
<listener class="StartSessionListener" file="startsessionlistener.php" />
|
<listener class="StartSessionListener" file="startsessionlistener.php" />
|
||||||
</listeners>
|
</listeners>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue