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
e789e056
Commit
e789e056
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
on unit test use @expectedException
some phpdoc added
parent
bb07dde9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/legacy/config.php
+3
-0
3 additions, 0 deletions
lib/legacy/config.php
tests/lib/config.php
+9
-6
9 additions, 6 deletions
tests/lib/config.php
with
12 additions
and
6 deletions
lib/legacy/config.php
+
3
−
0
View file @
e789e056
...
...
@@ -41,6 +41,9 @@
OC_Config
::
$object
=
new
\OC\Config
(
OC
::
$SERVERROOT
.
'/config/'
);
class
OC_Config
{
/**
* @var \OC\Config
*/
public
static
$object
;
/**
...
...
This diff is collapsed.
Click to expand it.
tests/lib/config.php
+
9
−
6
View file @
e789e056
...
...
@@ -11,6 +11,11 @@ class Test_Config extends PHPUnit_Framework_TestCase {
const
CONFIG_DIR
=
'static://'
;
const
TESTCONTENT
=
'<?php $CONFIG=array("foo"=>"bar");'
;
/**
* @var \OC\Config
*/
private
$config
;
function
setUp
()
{
file_put_contents
(
self
::
CONFIG_FILE
,
self
::
TESTCONTENT
);
$this
->
config
=
new
OC\Config
(
self
::
CONFIG_DIR
);
...
...
@@ -94,14 +99,12 @@ EOL
,
$content
);
}
/**
* @expectedException \OC\HintException
*/
public
function
testWriteData
()
{
$config
=
new
OC\Config
(
'/non-writable'
);
try
{
$config
->
setValue
(
'foo'
,
'bar'
);
}
catch
(
\OC\HintException
$e
)
{
return
;
}
$this
->
fail
();
$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