Skip to content

Commit 76d3d5e

Browse files
authored
Add PHP 7.2 builds (#49)
1 parent cf54467 commit 76d3d5e

6 files changed

Lines changed: 24 additions & 38 deletions

File tree

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ branches:
77

88
matrix:
99
include:
10+
- php: 7.2
11+
env: TYPO3_VERSION=^8.7
1012
- php: 7.1
1113
env: TYPO3_VERSION=^8.7
1214
- php: 7.0
1315
env: TYPO3_VERSION=^8.7
16+
- php: 7.2
17+
env: TYPO3_VERSION=^7.6
1418
- php: 7.1
1519
env: TYPO3_VERSION=^7.6
1620
- php: 7.0

Tests/Functional/AbstractRenderingTestCase.php

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
use Nimut\TestingFramework\Http\Response;
1717
use Nimut\TestingFramework\TestCase\FunctionalTestCase;
18+
use PHPUnit\Util\PHP\DefaultPhpProcess;
1819
use TYPO3\CMS\Core\Utility\GeneralUtility;
1920

2021
/**
@@ -32,23 +33,11 @@ abstract class AbstractRenderingTestCase extends FunctionalTestCase
3233
*/
3334
protected $coreExtensionsToLoad = array('fluid');
3435

35-
/**
36-
* Avoid serlialization of the test system object
37-
*
38-
* @return array
39-
*/
40-
public function __sleep()
41-
{
42-
$objectVars = get_object_vars($this);
43-
unset($objectVars['testSystem']);
44-
45-
return $objectVars;
46-
}
47-
4836
public function setUp()
4937
{
5038
parent::setUp();
51-
$this->setUpFrontendRootPage(1);
39+
$this->importDataSet(__DIR__ . '/Fixtures/Database/pages.xml');
40+
$this->setUpFrontendRootPage(1, array('EXT:typoscript_rendering/Tests/Functional/Fixtures/Frontend/Basic.ts'));
5241
}
5342

5443
/* ***********************************************
@@ -68,22 +57,6 @@ protected function getRenderUrl($pageId, $languageId, $path)
6857
return $this->fetchFrontendResponse($requestArguments)->getContent();
6958
}
7059

71-
/**
72-
* @param int $pageId
73-
* @param array $typoScriptFiles
74-
*
75-
* @return void
76-
*/
77-
protected function setUpFrontendRootPage($pageId, array $typoScriptFiles = array())
78-
{
79-
$page = array(
80-
'uid' => $pageId,
81-
'title' => 'root',
82-
);
83-
$this->getDatabaseConnection()->exec_INSERTquery('pages', $page);
84-
parent::setUpFrontendRootPage($pageId, array('EXT:typoscript_rendering/Tests/Functional/Fixtures/Frontend/Basic.ts'));
85-
}
86-
8760
/**
8861
* @param array $requestArguments
8962
* @param bool $failOnFailure
@@ -112,7 +85,11 @@ protected function fetchFrontendResponse(array $requestArguments, $failOnFailure
11285
)
11386
);
11487

115-
$php = \PHPUnit_Util_PHP::factory();
88+
if (class_exists('PHPUnit_Util_PHP')) {
89+
$php = \PHPUnit_Util_PHP::factory();
90+
} else {
91+
$php = DefaultPhpProcess::factory();
92+
}
11693
$response = $php->runJob($template->render());
11794
$result = json_decode($response['stdout'], true);
11895

Tests/Functional/FeNoPhpScriptIncludeRenderingTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
*
1414
*/
1515

16-
/**
17-
* Test case.
18-
*/
1916
class FeNoPhpScriptIncludeRenderingTest extends AbstractRenderingTestCase
2017
{
2118
/**
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<dataset>
3+
<pages>
4+
<uid>1</uid>
5+
<pid>0</pid>
6+
<title>Root</title>
7+
<doktype>1</doktype>
8+
<deleted>0</deleted>
9+
<perms_everybody>15</perms_everybody>
10+
</pages>
11+
</dataset>

Tests/Functional/RenderingTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
*
1414
*/
1515

16-
/**
17-
* Test case.
18-
*/
1916
class RenderingTest extends AbstractRenderingTestCase
2017
{
2118
/**

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"typo3/cms-core": "^6.2 || ^7.6 || ^8.7"
2626
},
2727
"require-dev": {
28-
"nimut/testing-framework": "^1.0"
28+
"nimut/testing-framework": "^2.0 || ^3.0"
2929
},
3030
"autoload": {
3131
"psr-4": {

0 commit comments

Comments
 (0)