TYPO3 CMS  TYPO3_6-2
All Classes Namespaces Files Functions Variables Pages
HasRecordConstraint.php
Go to the documentation of this file.
1 <?php
3 
18 
23 
28  protected function matchesSection(ResponseSection $responseSection) {
29  $records = $responseSection->getRecords();
30 
31  if (empty($records) || !is_array($records)) {
32  $this->sectionFailures[$responseSection->getIdentifier()] = 'No records found.';
33  return FALSE;
34  }
35 
36  $nonMatchingValues = $this->getNonMatchingValues($records);
37 
38  if (!empty($nonMatchingValues)) {
39  $this->sectionFailures[$responseSection->getIdentifier()] = 'Could not assert all values for "' . $this->table . '.' . $this->field . '": ' . implode(', ', $nonMatchingValues);
40  return FALSE;
41  }
42 
43  return TRUE;
44  }
45 
51  public function toString() {
52  return 'response has records';
53  }
54 
55 }