Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
8f93490a
Commit
8f93490a
authored
11 years ago
by
Morris Jobke
Browse files
Options
Downloads
Patches
Plain Diff
fix failing master branch - Test_Config::testWriteData
parent
05c83a16
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/config.php
+5
-1
5 additions, 1 deletion
lib/config.php
tests/lib/config.php
+11
-0
11 additions, 0 deletions
tests/lib/config.php
with
16 additions
and
1 deletion
lib/config.php
+
5
−
1
View file @
8f93490a
...
...
@@ -144,7 +144,11 @@ class Config {
continue
;
}
unset
(
$CONFIG
);
include
$file
;
if
((
@
include
$file
)
===
false
)
{
throw
new
HintException
(
"Can't read from config file '"
.
$file
.
"'. "
.
'This is usually caused by the wrong file permission.'
);
}
if
(
isset
(
$CONFIG
)
&&
is_array
(
$CONFIG
))
{
$this
->
cache
=
array_merge
(
$this
->
cache
,
$CONFIG
);
}
...
...
This diff is collapsed.
Click to expand it.
tests/lib/config.php
+
11
−
0
View file @
8f93490a
...
...
@@ -80,6 +80,17 @@ class Test_Config extends PHPUnit_Framework_TestCase {
*/
public
function
testWriteData
()
{
$config
=
new
OC\Config
(
'/non-writable'
);
// TODO never get's called, because the previous call throws the exception
// maybe include some more logic to create a readable dir and then try to
// write to this dir
//
// console commands:
// $ sudo touch /non-writableconfig.php
// $ sudo chmod go-rwx /non-writableconfig.php
// ---- call the tests now -> above statemant throws the exception
//
// $ sudo chmod go+r /non-writableconfig.php
// ---- call the tests now -> bellow statemant throws the exception
$config
->
setValue
(
'foo'
,
'bar'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment