chore(tests): Use valid application names for tests

Dash is not allowed in appid, underscore is.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/53895/head
Côme Chilliet 2 months ago
parent 0e01bc09a9
commit 3cea218750
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 6
      tests/lib/App/AppManagerTest.php
  2. 8
      tests/lib/Template/CSSResourceLocatorTest.php

@ -474,16 +474,16 @@ class AppManagerTest extends TestCase {
'writable' => false,
];
$fakeTestAppPath = $fakeAppPath . '/' . 'test-test-app';
$fakeTestAppPath = $fakeAppPath . '/' . 'test_test_app';
mkdir($fakeTestAppPath);
$generatedAppPath = $this->manager->getAppPath('test-test-app');
$generatedAppPath = $this->manager->getAppPath('test_test_app');
rmdir($fakeTestAppPath);
unlink($fakeAppLink);
rmdir($fakeAppPath);
$this->assertEquals($fakeAppLink . '/test-test-app', $generatedAppPath);
$this->assertEquals($fakeAppLink . '/test_test_app', $generatedAppPath);
}
public function testGetAppPathFail(): void {

@ -87,7 +87,7 @@ class CSSResourceLocatorTest extends \Test\TestCase {
symlink($apps_dirname, $new_apps_path_symlink);
// Create an app within that path
mkdir($new_apps_path . '/' . 'test-css-app');
mkdir($new_apps_path . '/' . 'test_css_app');
// Use the symlink as the app path
\OC::$APPSROOTS[] = [
@ -97,7 +97,7 @@ class CSSResourceLocatorTest extends \Test\TestCase {
];
$locator = $this->cssResourceLocator();
$locator->find(['test-css-app/test-file']);
$locator->find(['test_css_app/test-file']);
$resources = $locator->getResources();
$this->assertCount(1, $resources);
@ -107,8 +107,8 @@ class CSSResourceLocatorTest extends \Test\TestCase {
$webRoot = $resource[1];
$file = $resource[2];
$expectedRoot = $new_apps_path . '/test-css-app';
$expectedWebRoot = \OC::$WEBROOT . '/css-apps-test/test-css-app';
$expectedRoot = $new_apps_path . '/test_css_app';
$expectedWebRoot = \OC::$WEBROOT . '/css-apps-test/test_css_app';
$expectedFile = 'test-file.css';
$this->assertEquals($expectedRoot, $root,

Loading…
Cancel
Save