Skip to content

Commit 6c9e5b9

Browse files
committed
Remove iterator from UniqueStringBagTest
1 parent 734afaa commit 6c9e5b9

2 files changed

Lines changed: 3 additions & 24 deletions

File tree

src/ValueAbstracts/UniqueStringBag.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44

55
namespace 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
*/

tests/src/ValueAbstracts/UniqueStringBagTest.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)