TYPO3 CMS  TYPO3_7-6
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 }
static getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)