Commit 5f0995be authored by Marc Egger's avatar Marc Egger
Browse files

Fix some unittests: add Path

parent 07843cdf
Pipeline #3882 failed with stages
in 1 minute and 59 seconds
......@@ -21,6 +21,8 @@ require_once(__DIR__ . '/Database/AbstractDatabaseTest.php');
*/
class DeleteTest extends AbstractDatabaseTest {
private static $previousCwdToApp = '';
/**
* @expectedException CodeException
*/
......@@ -75,6 +77,7 @@ class DeleteTest extends AbstractDatabaseTest {
$this->store->setVar('form', 'TestFormName', STORE_TYPO3);
self::$previousCwdToApp = Path::cwdToApp();
Path::setMainPaths('/tmp');
// 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);
......@@ -82,4 +85,10 @@ class DeleteTest extends AbstractDatabaseTest {
$this->executeSQLFile(__DIR__ . '/Database/fixtures/Generic.sql', true);
}
protected function tearDown()
{
parent::tearDown();
Path::setMainPaths(self::$previousCwdToApp);
}
}
<?php
use IMATHUZH\Qfq\Core\Helper\Path;
require dirname(__DIR__).'/vendor/autoload.php';
Path::setMainPaths('../../../');
\ No newline at end of file
<phpunit bootstrap="vendor/autoload.php">
<phpunit bootstrap="Tests/phpunit_bootstrap.php">
<testsuites>
<testsuite name="qfq">
<directory>Tests/Unit</directory>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment