‪TYPO3CMS  9.5
CheckValueTest.php
Go to the documentation of this file.
1 <?php
3 
6 
11 {
15  protected ‪$scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/';
16 
17  protected function ‪setUp()
18  {
19  $this->testExtensionsToLoad[] = 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler';
20 
21  parent::setUp();
22  $this->‪importScenarioDataSet('LiveDefaultPages');
23  }
24 
29  {
30  $record = $this->‪insertRecordWithRadioFieldValue('predefined value');
31 
32  $this->assertEquals('predefined value', $record['tx_testdatahandler_radio']);
33  }
34 
39  {
40  $record = $this->‪insertRecordWithRadioFieldValue('processed value');
41 
42  $this->assertEquals('processed value', $record['tx_testdatahandler_radio']);
43  }
44 
49  {
50  $record = $this->‪insertRecordWithRadioFieldValue('some other value');
51 
52  $this->assertEquals('', $record['tx_testdatahandler_radio']);
53  }
54 
58  protected function ‪insertRecordWithRadioFieldValue($value)
59  {
60  // pid 88 comes from LiveDefaultPages
61  $result = $this->actionService->createNewRecord('tt_content', 88, [
62  'tx_testdatahandler_radio' => $value
63  ]);
64  $recordUid = $result['tt_content'][0];
65 
66  $record = ‪BackendUtility::getRecord('tt_content', $recordUid);
67 
68  return $record;
69  }
70 }
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\insertRecordWithRadioFieldValue
‪array insertRecordWithRadioFieldValue($value)
Definition: CheckValueTest.php:57
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest
Definition: CheckValueTest.php:11
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\radioButtonValueMustBeDefinedInTcaItems
‪radioButtonValueMustBeDefinedInTcaItems()
Definition: CheckValueTest.php:27
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\radioButtonValueIsNotSavedIfNotDefinedInTcaItemsOrProcessingItems
‪radioButtonValueIsNotSavedIfNotDefinedInTcaItemsOrProcessingItems()
Definition: CheckValueTest.php:47
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase
Definition: AbstractDataHandlerActionTestCase.php:33
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\radioButtonValueMustComeFromItemsProcFuncIfNotDefinedInTcaItems
‪radioButtonValueMustComeFromItemsProcFuncIfNotDefinedInTcaItems()
Definition: CheckValueTest.php:37
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\$scenarioDataSetDirectory
‪string $scenarioDataSetDirectory
Definition: CheckValueTest.php:14
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:72
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular
Definition: AbstractActionTestCase.php:2
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\CheckValueTest\setUp
‪setUp()
Definition: CheckValueTest.php:16
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecord
‪static array null getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
Definition: BackendUtility.php:130
‪TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase\importScenarioDataSet
‪importScenarioDataSet($dataSetName)
Definition: AbstractDataHandlerActionTestCase.php:117