Skip to content

Commit

Permalink
Merge pull request #42 from IchHabRecht/upgrade-nimut-testing-framework
Browse files Browse the repository at this point in the history
  • Loading branch information
IchHabRecht authored Sep 2, 2017
2 parents 9c4e332 + ddd64f6 commit 7646e54
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Configuration/TCA/Overrides/tt_content.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$sortedItems[] = [
'LLL:EXT:multicolumn/locallang_db.xml:tx_multicolumn_multicolumn',
'multicolumn',
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('multicolumn') . 'tt_content_multicolumn.gif',
'EXT:multicolumn/tt_content_multicolumn.gif',
];
$multicolumnAdded = true;
}
Expand All @@ -45,7 +45,7 @@
'--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime, fe_group',
];

$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['multicolumn'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('multicolumn') . 'tt_content_multicolumn.gif';
$GLOBALS['TCA']['tt_content']['ctrl']['typeicons']['multicolumn'] = 'EXT:multicolumn/tt_content_multicolumn.gif';

// Add tx_multicolumn_parentid to tt_content table
$tempColumns = [
Expand Down
16 changes: 8 additions & 8 deletions Tests/Functional/Hooks/DefaultLanguage/CopyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function copyContainerAndChildrenToOtherColumnInDefaultLanguage()
$containerUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][1];
$childUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][2];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $containerUid
Expand All @@ -60,7 +60,7 @@ public function copyContainerAndChildrenToOtherColumnInDefaultLanguage()
);
$this->assertSame(1, $count);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $childUid
Expand Down Expand Up @@ -104,7 +104,7 @@ public function copyContainerAndChildrenToOtherPageInDefaultLanguage()
$containerUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][1];
$childUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][2];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $containerUid
Expand All @@ -116,7 +116,7 @@ public function copyContainerAndChildrenToOtherPageInDefaultLanguage()
);
$this->assertSame(1, $count);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $childUid
Expand Down Expand Up @@ -159,7 +159,7 @@ public function copyChildFromContainerToOtherColumnInDefaultLanguage()

$copiedUID = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][2];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $copiedUID
Expand Down Expand Up @@ -193,7 +193,7 @@ public function copyRecordIntoContainerAfterRecordInDefaultLanguage()

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'pid=1'
Expand Down Expand Up @@ -230,7 +230,7 @@ public function copyContainerAndChildrenToOtherContainerInDefaultLanguage()
$containerUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][1];
$childUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][2];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $containerUid
Expand All @@ -242,7 +242,7 @@ public function copyContainerAndChildrenToOtherContainerInDefaultLanguage()
);
$this->assertSame(1, $count);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $childUid
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Hooks/DefaultLanguage/DeleteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function deleteContainerDeletesChildrenInDefaultLanguage()

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid IN (1,2)'
Expand Down
8 changes: 4 additions & 4 deletions Tests/Functional/Hooks/DefaultLanguage/NewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function addContainerToEmptyPageInDefaultLanguage()

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'pid=2'
Expand Down Expand Up @@ -84,7 +84,7 @@ public function addContainerToPageWithContainerInDifferentColumnInDefaultLanguag

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'pid=1'
Expand Down Expand Up @@ -123,7 +123,7 @@ public function addContainerToPageWithContainerInSameColumnInDefaultLanguage()

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'pid=1'
Expand Down Expand Up @@ -162,7 +162,7 @@ public function addContainerToOtherContainerInDefaultLanguage()

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'pid=1'
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Hooks/DefaultLanguage/PasteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function pasteRecordIntoContainerInDefaultLanguage()

$this->assertNoProssesingErrorsInDataHandler($dataHandler);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=3'
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Hooks/Translation/CopyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function copyContainerAndChildrenToOtherColumnInOtherLanguage()
$containerUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][1];
$childUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][2];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $containerUid
Expand All @@ -61,7 +61,7 @@ public function copyContainerAndChildrenToOtherColumnInOtherLanguage()
);
$this->assertSame(1, $count);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $childUid
Expand Down
12 changes: 6 additions & 6 deletions Tests/Functional/Hooks/Translation/LocalizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function localizeContainerAndChildrenFromDefaultLanguage()
$containerUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][1];
$childUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][2];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $containerUid
Expand All @@ -54,7 +54,7 @@ public function localizeContainerAndChildrenFromDefaultLanguage()
);
$this->assertSame(1, $count);

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $childUid
Expand Down Expand Up @@ -97,7 +97,7 @@ public function localizeNestedContainersAndChildrenFromDefaultLanguage()
$nestedContainerUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][4];
$nestedChildUid = $dataHandler->copyMappingArray[tx_multicolumn_tcemainBaseTest::CONTENT_TABLE][5];

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $containerUid
Expand All @@ -110,7 +110,7 @@ public function localizeNestedContainersAndChildrenFromDefaultLanguage()
);
$this->assertSame(1, $count, 'Container was not found');

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $childUid
Expand All @@ -123,7 +123,7 @@ public function localizeNestedContainersAndChildrenFromDefaultLanguage()
);
$this->assertSame(1, $count, 'Child was not found');

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $nestedContainerUid
Expand All @@ -136,7 +136,7 @@ public function localizeNestedContainersAndChildrenFromDefaultLanguage()
);
$this->assertSame(1, $count, 'Nested container was not found');

$count = $this->getDatabaseConnection()->exec_SELECTcountRows(
$count = $this->getDatabaseConnection()->selectCount(
'*',
tx_multicolumn_tcemainBaseTest::CONTENT_TABLE,
'uid=' . $nestedChildUid
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"typo3/cms-core": ">=7.6.0,<8.8.0"
},
"require-dev": {
"nimut/testing-framework": "1.x-dev",
"nimut/testing-framework": "2.x-dev",
"phpunit/phpunit": "^4.8"
},
"suggest": {
Expand Down
1 change: 0 additions & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

// define multicolumn path
define('PATH_tx_multicolumn', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multicolumn'));
define('PATH_tx_multicolumn_rel', \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('multicolumn'));

//hooks
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = 'tx_multicolumn_tcemain';
Expand Down
2 changes: 1 addition & 1 deletion hooks/class.tx_multicolumn_tt_content_drawItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function preProcess(\TYPO3\CMS\Backend\View\PageLayoutView &$parentObject
// return if not multicolumn
if ($row['CType'] == 'multicolumn') {
$pageRenderer = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Page\PageRenderer::class);
$pageRenderer->addCssFile(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('multicolumn') . $this->cssFile, 'stylesheet', 'screen');
$pageRenderer->addCssFile('EXT:multicolumn/' . $this->cssFile, 'stylesheet', 'screen');

$this->flex = GeneralUtility::makeInstance('tx_multicolumn_flexform', $row['pi_flexform']);
$this->pObj = $parentObject;
Expand Down

0 comments on commit 7646e54

Please sign in to comment.