Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit e6d259a

Browse files
authored
Merge pull request #4 from Nimut/add-functional-tests
Add basic functional tests
2 parents 59b00d2 + 31a0b37 commit e6d259a

15 files changed

Lines changed: 2053 additions & 0 deletions

compat/Frontend/Response.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
namespace TYPO3\CMS\Core\Tests\Functional\Framework\Frontend;
3+
4+
/*
5+
* This file is part of the NIMUT testing-framework project.
6+
*
7+
* It is free software; you can redistribute it and/or modify it under
8+
* the terms of the GNU General Public License, either version 2
9+
* of the License, or any later version.
10+
*
11+
* For the full copyright and license information, please read
12+
* LICENSE file that was distributed with this source code.
13+
*/
14+
15+
/**
16+
* @deprecated will be removed once TYPO3 9 LTS is released
17+
*/
18+
class Response extends \Nimut\TestingFramework\Http\Response
19+
{
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
namespace TYPO3\CMS\Core\Tests\Functional\Framework\Frontend;
3+
4+
/*
5+
* This file is part of the NIMUT testing-framework project.
6+
*
7+
* It is free software; you can redistribute it and/or modify it under
8+
* the terms of the GNU General Public License, either version 2
9+
* of the License, or any later version.
10+
*
11+
* For the full copyright and license information, please read
12+
* LICENSE file that was distributed with this source code.
13+
*/
14+
15+
/**
16+
* @deprecated will be removed once TYPO3 9 LTS is released
17+
*/
18+
class ResponseContent extends \Nimut\TestingFramework\Http\ResponseContent
19+
{
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
namespace TYPO3\CMS\Core\Tests\Functional\Framework\Frontend;
3+
4+
/*
5+
* This file is part of the NIMUT testing-framework project.
6+
*
7+
* It is free software; you can redistribute it and/or modify it under
8+
* the terms of the GNU General Public License, either version 2
9+
* of the License, or any later version.
10+
*
11+
* For the full copyright and license information, please read
12+
* LICENSE file that was distributed with this source code.
13+
*/
14+
15+
/**
16+
* @deprecated will be removed once TYPO3 9 LTS is released
17+
*/
18+
class ResponseSection extends \Nimut\TestingFramework\Http\ResponseSection
19+
{
20+
}

compat/FunctionalTestCase.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
namespace TYPO3\CMS\Core\Tests;
3+
4+
/*
5+
* This file is part of the NIMUT testing-framework project.
6+
*
7+
* It is free software; you can redistribute it and/or modify it under
8+
* the terms of the GNU General Public License, either version 2
9+
* of the License, or any later version.
10+
*
11+
* For the full copyright and license information, please read
12+
* LICENSE file that was distributed with this source code.
13+
*/
14+
15+
/**
16+
* @deprecated will be removed once TYPO3 9 LTS is released
17+
*/
18+
abstract class FunctionalTestCase extends \Nimut\TestingFramework\TestCase\FunctionalTestCase
19+
{
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
namespace TYPO3\CMS\Core\Tests;
3+
4+
/*
5+
* This file is part of the NIMUT testing-framework project.
6+
*
7+
* It is free software; you can redistribute it and/or modify it under
8+
* the terms of the GNU General Public License, either version 2
9+
* of the License, or any later version.
10+
*
11+
* For the full copyright and license information, please read
12+
* LICENSE file that was distributed with this source code.
13+
*/
14+
15+
/**
16+
* @deprecated will be removed once TYPO3 9 LTS is released
17+
*/
18+
class FunctionalTestCaseBootstrapUtility extends \Nimut\TestingFramework\Bootstrap\FunctionalTestCaseBootstrapUtility
19+
{
20+
}

compat/Packages/class-alias/ClassAliasMap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
return [
44
'TYPO3\\Components\\TestingFramework\\Core\\Exception' => \Nimut\TestingFramework\Exception\Exception::class,
55
'TYPO3\\Components\\TestingFramework\\Core\\FileStreamWrapper' => \Nimut\TestingFramework\File\FileStreamWrapper::class,
6+
'TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\\Frontend\\Response' => \Nimut\TestingFramework\Http\Response::class,
7+
'TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\\Frontend\\ResponseContent' => \Nimut\TestingFramework\Http\ResponseContent::class,
8+
'TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\\Frontend\\ResponseSection' => \Nimut\TestingFramework\Http\ResponseSection::class,
9+
'TYPO3\\Components\\TestingFramework\\Core\\Functional\\FunctionalTestCase' => \Nimut\TestingFramework\TestCase\FunctionalTestCase::class,
610
'TYPO3\\Components\\TestingFramework\\Core\\Unit\\UnitTestCase' => \Nimut\TestingFramework\TestCase\UnitTestCase::class,
711
'TYPO3\\Components\\TestingFramework\\Fluid\\Unit\\ViewHelpers\\ViewHelperBaseTestcase' => \Nimut\TestingFramework\TestCase\ViewHelperBaseTestcase::class,
812
];

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"typo3/cms-core": "^6.2 || ^7.6 || ^8.0 <8.7",
3434
"typo3/cms-extbase": "^6.2 || ^7.6 || ^8.0 <8.7",
3535
"typo3/cms-fluid": "^6.2 || ^7.6 || ^8.0 <8.7",
36+
"typo3/cms-install": "^6.2 || ^7.6 || ^8.0 <8.7",
3637
"phpunit/phpunit": "^4.8 || ^5.6",
3738
"mikey179/vfsStream": "^1.6"
3839
},
@@ -44,6 +45,7 @@
4445
"psr-4": {
4546
"Nimut\\TestingFramework\\": "src/TestingFramework/",
4647
"TYPO3\\CMS\\Core\\Tests\\": "compat/",
48+
"TYPO3\\CMS\\Core\\Tests\\Functional\\Framework\\": "compat/",
4749
"TYPO3\\CMS\\Fluid\\Tests\\": "compat/"
4850
}
4951
},
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<phpunit
2+
backupGlobals="true"
3+
backupStaticAttributes="false"
4+
bootstrap="../../src/TestingFramework/Bootstrap/FunctionalTestsBootstrap.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertWarningsToExceptions="true"
8+
forceCoversAnnotation="false"
9+
processIsolation="true"
10+
stopOnError="false"
11+
stopOnFailure="false"
12+
stopOnIncomplete="false"
13+
stopOnSkipped="false"
14+
verbose="false"
15+
/>

res/Fixtures/Database/be_users.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<dataset>
3+
<be_users>
4+
<uid>1</uid>
5+
<pid>0</pid>
6+
<tstamp>1366642540</tstamp>
7+
<username>admin</username>
8+
<password>$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1</password> <!-- password -->
9+
<admin>1</admin>
10+
<disable>0</disable>
11+
<starttime>0</starttime>
12+
<endtime>0</endtime>
13+
<options>0</options>
14+
<crdate>1366642540</crdate>
15+
<cruser_id>0</cruser_id>
16+
<workspace_perms>1</workspace_perms>
17+
<disableIPlock>1</disableIPlock>
18+
<deleted>0</deleted>
19+
<TSconfig>NULL</TSconfig>
20+
<lastlogin>1371033743</lastlogin>
21+
<createdByAction>0</createdByAction>
22+
<workspace_id>0</workspace_id>
23+
<workspace_preview>1</workspace_preview>
24+
</be_users>
25+
</dataset>

0 commit comments

Comments
 (0)