Skip to content
Snippets Groups Projects
Commit 9aaa2f7a authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Regression test for issue #39677

Add simple regression test for issue #39677 checking
the generated string contains 'value="1"'

Change-Id: I3bb51be68c22878d519d2176ab358777780b34d6
Resolves: #42652
Related: #39677
Releases: 6.0
Reviewed-on: http://review.typo3.org/16151
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent d40ddbc9
No related merge requests found
<?php
namespace TYPO3\CMS\Backend\Tests\Unit\Utility;
use TYPO3\CMS\Backend\Utility;
/***************************************************************
* Copyright notice
......@@ -39,7 +40,7 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
private $fixture;
public function setUp() {
$this->fixture = new \TYPO3\CMS\Backend\Utility\BackendUtility();
$this->fixture = new Utility\BackendUtility();
}
public function tearDown() {
......@@ -57,9 +58,10 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
$this->assertEquals('0', $this->fixture->getProcessedValue('tt_content', 'header', '0'));
}
////////////////////////////////////////////
// Tests concerning getCommenSelectFields
////////////////////////////////////////////
/**
* Tests concerning getCommenSelectFields
*/
/**
* Data provider for getCommonSelectFieldsReturnsCorrectFields
*
......@@ -174,9 +176,10 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
$this->assertEquals($selectFields, $expectedFields);
}
////////////////////////////////////////////
// Tests concerning getLabelFromItemlist
////////////////////////////////////////////
/**
* Tests concerning getLabelFromItemlist
*/
/**
* Data provider for getLabelFromItemlistReturnsCorrectFields
*
......@@ -260,9 +263,10 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
$this->assertEquals($label, $expectedLabel);
}
////////////////////////////////////////////
// Tests concerning getLabelFromItemListMerged
////////////////////////////////////////////
/**
* Tests concerning getLabelFromItemListMerged
*/
/**
* Data provider for getLabelFromItemListMerged
*
......@@ -328,6 +332,17 @@ class BackendUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
$this->assertEquals($label, $expectedLabel);
}
/**
* Tests concerning getFuncCheck
*/
/**
* @test
*/
public function getFuncCheckReturnsInputTagWithValueAttribute() {
$this->assertStringMatchesFormat('<input %Svalue="1"%S/>', Utility\BackendUtility::getFuncCheck('params', 'test', TRUE));
}
}
?>
\ No newline at end of file
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