Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
5f0995be
Commit
5f0995be
authored
Sep 30, 2020
by
Marc Egger
Browse files
Fix some unittests: add Path
parent
07843cdf
Pipeline
#3882
failed with stages
in 1 minute and 59 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Tests/Unit/Core/DeleteTest.php
View file @
5f0995be
...
@@ -21,6 +21,8 @@ require_once(__DIR__ . '/Database/AbstractDatabaseTest.php');
...
@@ -21,6 +21,8 @@ require_once(__DIR__ . '/Database/AbstractDatabaseTest.php');
*/
*/
class
DeleteTest
extends
AbstractDatabaseTest
{
class
DeleteTest
extends
AbstractDatabaseTest
{
private
static
$previousCwdToApp
=
''
;
/**
/**
* @expectedException CodeException
* @expectedException CodeException
*/
*/
...
@@ -75,6 +77,7 @@ class DeleteTest extends AbstractDatabaseTest {
...
@@ -75,6 +77,7 @@ class DeleteTest extends AbstractDatabaseTest {
$this
->
store
->
setVar
(
'form'
,
'TestFormName'
,
STORE_TYPO3
);
$this
->
store
->
setVar
(
'form'
,
'TestFormName'
,
STORE_TYPO3
);
self
::
$previousCwdToApp
=
Path
::
cwdToApp
();
Path
::
setMainPaths
(
'/tmp'
);
Path
::
setMainPaths
(
'/tmp'
);
// The above replaces the following line with a Path:: function. Probably won't work.
// The above replaces the following line with a Path:: function. Probably won't work.
// $this->store->setVar(SYSTEM_SITE_PATH_ABSOLUTE, '/tmp', STORE_SYSTEM, true);
// $this->store->setVar(SYSTEM_SITE_PATH_ABSOLUTE, '/tmp', STORE_SYSTEM, true);
...
@@ -82,4 +85,10 @@ class DeleteTest extends AbstractDatabaseTest {
...
@@ -82,4 +85,10 @@ class DeleteTest extends AbstractDatabaseTest {
$this
->
executeSQLFile
(
__DIR__
.
'/Database/fixtures/Generic.sql'
,
true
);
$this
->
executeSQLFile
(
__DIR__
.
'/Database/fixtures/Generic.sql'
,
true
);
}
}
protected
function
tearDown
()
{
parent
::
tearDown
();
Path
::
setMainPaths
(
self
::
$previousCwdToApp
);
}
}
}
extension/Tests/phpunit_bootstrap.php
0 → 100644
View file @
5f0995be
<?php
use
IMATHUZH\Qfq\Core\Helper\Path
;
require
dirname
(
__DIR__
)
.
'/vendor/autoload.php'
;
Path
::
setMainPaths
(
'../../../'
);
\ No newline at end of file
extension/phpunit.xml
View file @
5f0995be
<phpunit
bootstrap=
"
vendor/autoload
.php"
>
<phpunit
bootstrap=
"
Tests/phpunit_bootstrap
.php"
>
<testsuites>
<testsuites>
<testsuite
name=
"qfq"
>
<testsuite
name=
"qfq"
>
<directory>
Tests/Unit
</directory>
<directory>
Tests/Unit
</directory>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment