File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55namespace SimpleSAML \OpenID \ValueAbstracts ;
66
7- /**
8- * @implements \IteratorAggregate<int, string>
9- */
10- class UniqueStringBag implements \JsonSerializable, \IteratorAggregate
7+ class UniqueStringBag implements \JsonSerializable
118{
129 /**
1310 * @var string[]
@@ -22,15 +19,6 @@ public function __construct(
2219 }
2320
2421
25- /**
26- * @return \ArrayIterator<int, string>
27- */
28- public function getIterator (): \ArrayIterator
29- {
30- return new \ArrayIterator ($ this ->values );
31- }
32-
33-
3422 /**
3523 * @return string[]
3624 */
Original file line number Diff line number Diff line change @@ -23,17 +23,8 @@ protected function sut(
2323 }
2424
2525
26- public function testIsIterable (): void
26+ public function testCanCreateInstance (): void
2727 {
28- $ bag = $ this ->sut ();
29-
30- $ this ->assertInstanceOf (\Traversable::class, $ bag );
31-
32- $ result = [];
33- foreach ($ bag as $ item ) {
34- $ result [] = $ item ;
35- }
36-
37- $ this ->assertSame (['foo ' , 'bar ' ], $ result );
28+ $ this ->assertInstanceOf (UniqueStringBag::class, $ this ->sut ());
3829 }
3930}
You can’t perform that action at this time.
0 commit comments