Skip to content

Commit 97d3873

Browse files
committed
Fix port data for iterators
1 parent 87cc370 commit 97d3873

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/PhpFlo/Test/ComponentTestHelperTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function connectOutPorts(ComponentInterface $component) : ComponentInt
6262
->willReturnCallback(
6363
\Closure::bind(
6464
function ($data) {
65-
$this->data = $data;
65+
$this->data[] = $data;
6666
},
6767
$socket
6868
)

tests/PhpFlo/Component/CounterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function testBehavior()
3434

3535
$counter->sendCount();
3636

37-
$this->assertEquals(3, $this->getOutPortData('count'));
37+
$countData = $this->getOutPortData('count');
38+
$this->assertEquals(3, $countData[0]);
3839
}
3940
}

0 commit comments

Comments
 (0)