Skip to content

Commit 58e43e3

Browse files
committed
Fix heredoc for PHP7.2 compatibility
1 parent ab8c71c commit 58e43e3

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

tests/Basic/ErrorCollectionTest.php

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -99,46 +99,46 @@ public function invalidValuesForCompositionDataProvider(): array
9999
'matching both composition elements' => [
100100
6,
101101
<<<ERROR
102-
Invalid value for (.*?) declined by composition constraint\.
103-
Requires to match one composition element but matched 2 elements\.
104-
- Composition element #1: Valid
105-
- Composition element #2: Valid
106-
ERROR
102+
Invalid value for (.*?) declined by composition constraint\.
103+
Requires to match one composition element but matched 2 elements\.
104+
- Composition element #1: Valid
105+
- Composition element #2: Valid
106+
ERROR
107107
],
108108
'too low number both' => [
109109
0,
110110
<<<ERROR
111-
Invalid value for (.*?) declined by composition constraint\.
112-
Requires to match one composition element but matched 0 elements\.
113-
- Composition element #1: Failed
114-
\* Value for integerProperty must not be smaller than 2
115-
- Composition element #2: Failed
116-
\* Value for integerProperty must not be smaller than 3
117-
ERROR
111+
Invalid value for (.*?) declined by composition constraint\.
112+
Requires to match one composition element but matched 0 elements\.
113+
- Composition element #1: Failed
114+
\* Value for integerProperty must not be smaller than 2
115+
- Composition element #2: Failed
116+
\* Value for integerProperty must not be smaller than 3
117+
ERROR
118118
],
119119
'nothing matches' => [
120120
1,
121121
<<<ERROR
122-
Invalid value for (.*?) declined by composition constraint\.
123-
Requires to match one composition element but matched 0 elements\.
124-
- Composition element #1: Failed
125-
\* Value for integerProperty must not be smaller than 2
126-
\* Value for integerProperty must be a multiple of 2
127-
- Composition element #2: Failed
128-
\* Value for integerProperty must not be smaller than 3
129-
\* Value for integerProperty must be a multiple of 3
130-
ERROR
122+
Invalid value for (.*?) declined by composition constraint\.
123+
Requires to match one composition element but matched 0 elements\.
124+
- Composition element #1: Failed
125+
\* Value for integerProperty must not be smaller than 2
126+
\* Value for integerProperty must be a multiple of 2
127+
- Composition element #2: Failed
128+
\* Value for integerProperty must not be smaller than 3
129+
\* Value for integerProperty must be a multiple of 3
130+
ERROR
131131
],
132132
'invalid type' => [
133133
"4",
134134
<<<ERROR
135-
Invalid value for (.*?) declined by composition constraint\.
136-
Requires to match one composition element but matched 0 elements\.
137-
- Composition element #1: Failed
138-
\* Invalid type for integerProperty. Requires int, got string
139-
- Composition element #2: Failed
140-
\* Invalid type for integerProperty. Requires int, got string
141-
ERROR
135+
Invalid value for (.*?) declined by composition constraint\.
136+
Requires to match one composition element but matched 0 elements\.
137+
- Composition element #1: Failed
138+
\* Invalid type for integerProperty. Requires int, got string
139+
- Composition element #2: Failed
140+
\* Invalid type for integerProperty. Requires int, got string
141+
ERROR
142142
],
143143
];
144144
}

tests/ComposedValue/ComposedOneOfTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public function testNotProvidedObjectLevelOneOfThrowsAnException(string $schema,
4848
$this->expectException(ValidationException::class);
4949
$this->expectExceptionMessageRegExp(
5050
<<<ERROR
51-
/^Invalid value for (.*?) declined by composition constraint.
52-
Requires to match one composition element but matched $matchedElements elements.$/
53-
ERROR
51+
/^Invalid value for (.*?) declined by composition constraint.
52+
Requires to match one composition element but matched $matchedElements elements.$/
53+
ERROR
5454
);
5555

5656
$className = $this->generateClassFromFile($schema);

0 commit comments

Comments
 (0)