Skip to content

Commit 0c84c1b

Browse files
committed
Fixing PHPSpec
1 parent 0b00b01 commit 0c84c1b

File tree

3 files changed

+64
-3
lines changed

3 files changed

+64
-3
lines changed

spec/ComplexResultBucketSpec.php

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ function it_has_non_empty_acceptance()
2727
new \stdClass()
2828
),
2929
new RejectionResultBucket(
30+
'Lorem ipsum dolor sit amet',
31+
new \Exception('Lorem ipsum dolor sit amet'),
32+
new \stdClass(),
3033
new \stdClass(),
3134
new \stdClass(),
32-
new \stdClass()
3335
),
3436
new AcceptanceResultBucket(
3537
new \stdClass()
@@ -50,6 +52,16 @@ public function walkRejection(): iterable
5052
new \stdClass()
5153
];
5254
}
55+
56+
public function reasons(): ?array
57+
{
58+
return null;
59+
}
60+
61+
public function exceptions(): ?array
62+
{
63+
return null;
64+
}
5365
},
5466
new class implements AcceptanceResultBucketInterface, RejectionResultBucketInterface {
5567
public function walkAcceptance(): iterable
@@ -77,6 +89,16 @@ public function getIterator(): \Traversable
7789
}
7890
};
7991
}
92+
93+
public function reasons(): ?array
94+
{
95+
return null;
96+
}
97+
98+
public function exceptions(): ?array
99+
{
100+
return null;
101+
}
80102
}
81103
);
82104

@@ -87,6 +109,8 @@ function it_has_non_empty_rejection()
87109
{
88110
$this->beConstructedWith(
89111
new RejectionResultBucket(
112+
'Lorem ipsum dolor sit amet',
113+
new \Exception('Lorem ipsum dolor sit amet'),
90114
new \stdClass(),
91115
new \stdClass()
92116
),
@@ -96,6 +120,8 @@ function it_has_non_empty_rejection()
96120
new \stdClass()
97121
),
98122
new RejectionResultBucket(
123+
'Lorem ipsum dolor sit amet',
124+
new \Exception('Lorem ipsum dolor sit amet'),
99125
new \stdClass()
100126
),
101127
new class implements AcceptanceResultBucketInterface, RejectionResultBucketInterface {
@@ -114,6 +140,16 @@ public function walkRejection(): iterable
114140
new \stdClass()
115141
];
116142
}
143+
144+
public function reasons(): ?array
145+
{
146+
return null;
147+
}
148+
149+
public function exceptions(): ?array
150+
{
151+
return null;
152+
}
117153
},
118154
new class implements AcceptanceResultBucketInterface, RejectionResultBucketInterface {
119155
public function walkAcceptance(): iterable
@@ -141,6 +177,16 @@ public function getIterator(): \Traversable
141177
}
142178
};
143179
}
180+
181+
public function reasons(): ?array
182+
{
183+
return null;
184+
}
185+
186+
public function exceptions(): ?array
187+
{
188+
return null;
189+
}
144190
}
145191
);
146192

@@ -162,6 +208,8 @@ function it_can_accept_values()
162208
function it_can_reject_values()
163209
{
164210
$this->reject(
211+
'Lorem ipsum dolor sit amet',
212+
new \Exception('Lorem ipsum dolor sit amet'),
165213
new \stdClass(),
166214
new \stdClass(),
167215
new \stdClass()

spec/IteratorRejectionResultBucketSpec.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ class IteratorRejectionResultBucketSpec extends ObjectBehavior
1111
{
1212
function it_is_initializable()
1313
{
14-
$this->beConstructedWith(new \EmptyIterator());
14+
$this->beConstructedWith(
15+
'Lorem ipsum dolor sit amet',
16+
new \Exception('Lorem ipsum dolor sit amet'),
17+
new \EmptyIterator()
18+
);
1519

1620
$this->shouldHaveType(IteratorRejectionResultBucket::class);
1721
$this->shouldBeAnInstanceOf(RejectionResultBucketInterface::class);
@@ -20,6 +24,8 @@ function it_is_initializable()
2024
function it_has_non_empty_rejection()
2125
{
2226
$this->beConstructedWith(
27+
'Lorem ipsum dolor sit amet',
28+
new \Exception('Lorem ipsum dolor sit amet'),
2329
new \ArrayIterator([
2430
new \stdClass(),
2531
new \stdClass(),

spec/RejectionResultBucketSpec.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,23 @@ class RejectionResultBucketSpec extends ObjectBehavior
1111
{
1212
function it_is_initializable()
1313
{
14+
$this->beConstructedWith(
15+
'Lorem ipsum dolor sit amet',
16+
new \Exception('Lorem ipsum dolor sit amet'),
17+
);
18+
1419
$this->shouldHaveType(RejectionResultBucket::class);
1520
$this->shouldBeAnInstanceOf(RejectionResultBucketInterface::class);
1621
}
1722

1823
function it_has_non_empty_rejection()
1924
{
2025
$this->beConstructedWith(
26+
'Lorem ipsum dolor sit amet',
27+
new \Exception('Lorem ipsum dolor sit amet'),
28+
new \stdClass(),
2129
new \stdClass(),
2230
new \stdClass(),
23-
new \stdClass()
2431
);
2532

2633
$this->walkRejection()->shouldHaveCount(3);

0 commit comments

Comments
 (0)