Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
67ed48d4
Commit
67ed48d4
authored
11 years ago
by
Morris Jobke
Browse files
Options
Downloads
Plain Diff
Merge pull request #3884 from owncloud/fixing-unittests-master
Fixing unittests master
parents
30a403e3
de66861e
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/lib/backgroundjob/timedjob.php
+3
-0
3 additions, 0 deletions
tests/lib/backgroundjob/timedjob.php
tests/lib/hooks/basicemitter.php
+18
-0
18 additions, 0 deletions
tests/lib/hooks/basicemitter.php
tests/lib/session/session.php
+2
-0
2 additions, 0 deletions
tests/lib/session/session.php
with
23 additions
and
0 deletions
tests/lib/backgroundjob/timedjob.php
+
3
−
0
View file @
67ed48d4
...
@@ -41,6 +41,7 @@ class TimedJob extends \PHPUnit_Framework_TestCase {
...
@@ -41,6 +41,7 @@ class TimedJob extends \PHPUnit_Framework_TestCase {
$this
->
fail
(
"job should have run"
);
$this
->
fail
(
"job should have run"
);
}
catch
(
JobRun
$e
)
{
}
catch
(
JobRun
$e
)
{
}
}
$this
->
assertTrue
(
true
);
}
}
public
function
testShouldNotRunWithinInterval
()
{
public
function
testShouldNotRunWithinInterval
()
{
...
@@ -50,6 +51,7 @@ class TimedJob extends \PHPUnit_Framework_TestCase {
...
@@ -50,6 +51,7 @@ class TimedJob extends \PHPUnit_Framework_TestCase {
}
catch
(
JobRun
$e
)
{
}
catch
(
JobRun
$e
)
{
$this
->
fail
(
"job should not have run"
);
$this
->
fail
(
"job should not have run"
);
}
}
$this
->
assertTrue
(
true
);
}
}
public
function
testShouldNotTwice
()
{
public
function
testShouldNotTwice
()
{
...
@@ -64,5 +66,6 @@ class TimedJob extends \PHPUnit_Framework_TestCase {
...
@@ -64,5 +66,6 @@ class TimedJob extends \PHPUnit_Framework_TestCase {
$this
->
fail
(
"job should not have run the second time"
);
$this
->
fail
(
"job should not have run the second time"
);
}
}
}
}
$this
->
assertTrue
(
true
);
}
}
}
}
This diff is collapsed.
Click to expand it.
tests/lib/hooks/basicemitter.php
+
18
−
0
View file @
67ed48d4
...
@@ -155,6 +155,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -155,6 +155,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener
);
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Test'
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Test'
,
'test'
,
$listener
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
public
function
testRemoveWildcardListener
()
{
public
function
testRemoveWildcardListener
()
{
...
@@ -168,6 +170,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -168,6 +170,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener2
);
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener2
);
$this
->
emitter
->
removeListener
(
'Test'
,
'test'
);
$this
->
emitter
->
removeListener
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
public
function
testRemoveWildcardMethod
()
{
public
function
testRemoveWildcardMethod
()
{
...
@@ -179,6 +183,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -179,6 +183,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
removeListener
(
'Test'
,
null
,
$listener
);
$this
->
emitter
->
removeListener
(
'Test'
,
null
,
$listener
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'foo'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'foo'
);
$this
->
assertTrue
(
true
);
}
}
public
function
testRemoveWildcardScope
()
{
public
function
testRemoveWildcardScope
()
{
...
@@ -190,6 +196,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -190,6 +196,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
removeListener
(
null
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
null
,
'test'
,
$listener
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Bar'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Bar'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
public
function
testRemoveWildcardScopeAndMethod
()
{
public
function
testRemoveWildcardScopeAndMethod
()
{
...
@@ -203,6 +211,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -203,6 +211,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'foo'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'foo'
);
$this
->
emitter
->
emitEvent
(
'Bar'
,
'foo'
);
$this
->
emitter
->
emitEvent
(
'Bar'
,
'foo'
);
$this
->
assertTrue
(
true
);
}
}
/**
/**
...
@@ -219,6 +229,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -219,6 +229,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener2
);
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener2
);
$this
->
emitter
->
removeListener
(
'Test'
,
'test'
,
$listener1
);
$this
->
emitter
->
removeListener
(
'Test'
,
'test'
,
$listener1
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
/**
/**
...
@@ -232,6 +244,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -232,6 +244,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
listen
(
'Test'
,
'foo'
,
$listener
);
$this
->
emitter
->
listen
(
'Test'
,
'foo'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Test'
,
'foo'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Test'
,
'foo'
,
$listener
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
/**
/**
...
@@ -245,6 +259,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -245,6 +259,8 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
listen
(
'Bar'
,
'test'
,
$listener
);
$this
->
emitter
->
listen
(
'Bar'
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Bar'
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Bar'
,
'test'
,
$listener
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
/**
/**
...
@@ -257,5 +273,7 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
...
@@ -257,5 +273,7 @@ class BasicEmitter extends \PHPUnit_Framework_TestCase {
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener
);
$this
->
emitter
->
listen
(
'Test'
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Bar'
,
'test'
,
$listener
);
$this
->
emitter
->
removeListener
(
'Bar'
,
'test'
,
$listener
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
emitter
->
emitEvent
(
'Test'
,
'test'
);
$this
->
assertTrue
(
true
);
}
}
}
}
This diff is collapsed.
Click to expand it.
tests/lib/session/session.php
+
2
−
0
View file @
67ed48d4
...
@@ -44,7 +44,9 @@ abstract class Session extends \PHPUnit_Framework_TestCase {
...
@@ -44,7 +44,9 @@ abstract class Session extends \PHPUnit_Framework_TestCase {
}
}
public
function
testRemoveNonExisting
()
{
public
function
testRemoveNonExisting
()
{
$this
->
assertFalse
(
$this
->
instance
->
exists
(
'foo'
));
$this
->
instance
->
remove
(
'foo'
);
$this
->
instance
->
remove
(
'foo'
);
$this
->
assertFalse
(
$this
->
instance
->
exists
(
'foo'
));
}
}
public
function
testNotExistsAfterClear
()
{
public
function
testNotExistsAfterClear
()
{
...
...
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