TYPO3 CMS
TYPO3_6-2
Main Page
Related Pages
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
+
Files
File List
+
File Members
+
All
$
(
_
a
c
d
e
f
h
i
l
o
p
r
s
t
u
x
+
Functions
_
a
c
d
e
f
i
l
o
p
r
s
u
x
+
Variables
$
(
_
a
d
e
h
i
p
r
s
t
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Pages
HasRecordConstraint.php
Go to the documentation of this file.
1
<?php
2
namespace
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection
;
3
17
use
TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\ResponseSection
;
18
22
class
HasRecordConstraint
extends
AbstractRecordConstraint
{
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
}
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection\AbstractRecordConstraint\getNonMatchingValues
getNonMatchingValues(array $records)
Definition:
AbstractRecordConstraint.php:100
TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\ResponseSection\getIdentifier
getIdentifier()
Definition:
ResponseSection.php:65
ResponseSection
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection\HasRecordConstraint
Definition:
HasRecordConstraint.php:22
TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\ResponseSection\getRecords
getRecords()
Definition:
ResponseSection.php:86
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection
Definition:
AbstractRecordConstraint.php:2
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection\HasRecordConstraint\matchesSection
matchesSection(ResponseSection $responseSection)
Definition:
HasRecordConstraint.php:28
TYPO3\CMS\Core\Tests\Functional\Framework\Frontend\ResponseSection
Definition:
ResponseSection.php:20
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection\AbstractRecordConstraint
Definition:
AbstractRecordConstraint.php:22
TYPO3\CMS\Core\Tests\Functional\Framework\Constraint\RequestSection\HasRecordConstraint\toString
toString()
Definition:
HasRecordConstraint.php:51
typo3
sysext
core
Tests
Functional
Framework
Constraint
RequestSection
HasRecordConstraint.php
Generated on Wed Aug 7 2019 09:52:23 for TYPO3 CMS by
1.8.13