mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #1373 from nextcloud/upstream-26091
Clean up code coverage
This commit is contained in:
commit
a9c243948b
2 changed files with 7 additions and 41 deletions
|
|
@ -53,8 +53,8 @@ class ClassLoader
|
|||
|
||||
private $useIncludePath = false;
|
||||
private $classMap = array();
|
||||
|
||||
private $classMapAuthoritative = false;
|
||||
private $missingClasses = array();
|
||||
|
||||
public function getPrefixes()
|
||||
{
|
||||
|
|
@ -322,20 +322,20 @@ class ClassLoader
|
|||
if (isset($this->classMap[$class])) {
|
||||
return $this->classMap[$class];
|
||||
}
|
||||
if ($this->classMapAuthoritative) {
|
||||
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$file = $this->findFileWithExtension($class, '.php');
|
||||
|
||||
// Search for Hack files if we are running on HHVM
|
||||
if ($file === null && defined('HHVM_VERSION')) {
|
||||
if (false === $file && defined('HHVM_VERSION')) {
|
||||
$file = $this->findFileWithExtension($class, '.hh');
|
||||
}
|
||||
|
||||
if ($file === null) {
|
||||
if (false === $file) {
|
||||
// Remember that this class does not exist.
|
||||
return $this->classMap[$class] = false;
|
||||
$this->missingClasses[$class] = true;
|
||||
}
|
||||
|
||||
return $file;
|
||||
|
|
@ -399,6 +399,8 @@ class ClassLoader
|
|||
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
|
||||
return $file;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<phpunit bootstrap="bootstrap.php">
|
||||
<testsuite name='ownCloud'>
|
||||
<directory suffix='.php'>lib/</directory>
|
||||
<directory suffix='.php'>Settings/</directory>
|
||||
<directory suffix='.php'>Core/</directory>
|
||||
<file>apps.php</file>
|
||||
</testsuite>
|
||||
<!-- filters for code coverage -->
|
||||
<filter>
|
||||
<!-- whitelist processUncoveredFilesFromWhitelist="true" -->
|
||||
<whitelist>
|
||||
<directory suffix=".php">..</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">../3rdparty</directory>
|
||||
<directory suffix=".php">../apps/files/l10n</directory>
|
||||
<directory suffix=".php">../apps/files_external/l10n</directory>
|
||||
<directory suffix=".php">../apps/files_external/3rdparty</directory>
|
||||
<directory suffix=".php">../apps/files_versions/l10n</directory>
|
||||
<directory suffix=".php">../apps/encryption/l10n</directory>
|
||||
<directory suffix=".php">../apps/files_sharing/l10n</directory>
|
||||
<directory suffix=".php">../apps/files_trashbin/l10n</directory>
|
||||
<directory suffix=".php">../apps/user_ldap/l10n</directory>
|
||||
<directory suffix=".php">../apps/user_webdavauth/l10n</directory>
|
||||
<directory suffix=".php">../apps/provisioning_api/tests</directory>
|
||||
<directory suffix=".php">../lib/l10n</directory>
|
||||
<directory suffix=".php">../core/l10n</directory>
|
||||
<directory suffix=".php">../settings/l10n</directory>
|
||||
<directory suffix=".php">../tests</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<listeners>
|
||||
<listener class="StartSessionListener" file="startsessionlistener.php" />
|
||||
</listeners>
|
||||
</phpunit>
|
||||
Loading…
Reference in a new issue