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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
fc697c72
Commit
fc697c72
authored
11 years ago
by
Thomas Müller
Browse files
Options
Downloads
Patches
Plain Diff
adding StartSessionListener which initializes the session before each test case execution
parent
9fe5033f
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/phpunit-autotest.xml
+1
-0
1 addition, 0 deletions
tests/phpunit-autotest.xml
tests/phpunit.xml.dist
+3
-0
3 additions, 0 deletions
tests/phpunit.xml.dist
tests/startsessionlistener.php
+45
-0
45 additions, 0 deletions
tests/startsessionlistener.php
with
49 additions
and
0 deletions
tests/phpunit-autotest.xml
+
1
−
0
View file @
fc697c72
...
...
@@ -36,6 +36,7 @@
</whitelist>
</filter>
<listeners>
<listener
class=
"StartSessionListener"
file=
"startsessionlistener.php"
/>
<listener
class=
"TestCleanupListener"
file=
"testcleanuplistener.php"
>
<arguments>
<string>
detail
</string>
...
...
This diff is collapsed.
Click to expand it.
tests/phpunit.xml.dist
+
3
−
0
View file @
fc697c72
...
...
@@ -29,4 +29,7 @@
</exclude>
</whitelist>
</filter>
<listeners>
<listener
class=
"StartSessionListener"
file=
"startsessionlistener.php"
/>
</listeners>
</phpunit>
This diff is collapsed.
Click to expand it.
tests/startsessionlistener.php
0 → 100644
+
45
−
0
View file @
fc697c72
<?php
/**
* Copyright (c) 2014 Thomas Müller <deepdiver@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
/**
* Starts a new session before each test execution
*/
class
StartSessionListener
implements
PHPUnit_Framework_TestListener
{
public
function
addError
(
PHPUnit_Framework_Test
$test
,
Exception
$e
,
$time
)
{
}
public
function
addFailure
(
PHPUnit_Framework_Test
$test
,
PHPUnit_Framework_AssertionFailedError
$e
,
$time
)
{
}
public
function
addIncompleteTest
(
PHPUnit_Framework_Test
$test
,
Exception
$e
,
$time
)
{
}
public
function
addSkippedTest
(
PHPUnit_Framework_Test
$test
,
Exception
$e
,
$time
)
{
}
public
function
startTest
(
PHPUnit_Framework_Test
$test
)
{
// new session
\OC
::
$session
=
new
\OC\Session\Memory
(
''
);
// load the version
OC_Util
::
getVersion
();
}
public
function
endTest
(
PHPUnit_Framework_Test
$test
,
$time
)
{
}
public
function
startTestSuite
(
PHPUnit_Framework_TestSuite
$suite
)
{
}
public
function
endTestSuite
(
PHPUnit_Framework_TestSuite
$suite
)
{
}
}
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