diff options
author | Robin Appelman <robin@icewind.nl> | 2020-01-13 12:49:35 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-01-13 12:49:35 +0300 |
commit | 31d6b887c892f60ba35919760e4feed775bb95ed (patch) | |
tree | 5d7466db88a5144334e9d9baed6769722fd35b4c /tests | |
parent | b2b708eea8aaeb6a8690f0c832d88c046e262baa (diff) |
ipc session cleanup
Diffstat (limited to 'tests')
-rw-r--r-- | tests/IPC/BackendTest.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/IPC/BackendTest.php b/tests/IPC/BackendTest.php index 409babb..4e7fa93 100644 --- a/tests/IPC/BackendTest.php +++ b/tests/IPC/BackendTest.php @@ -86,4 +86,15 @@ abstract class BackendTest extends TestCase { $this->assertEquals("bar", $backend2->popMessage("ch2", 1)); $this->assertEquals(null, $backend2->popMessage("ch2", 1)); } + + public function testCleanup() { + $backend1 = $this->getBackend(); + + $backend1->pushMessage("ch1", "foo"); + $backend1->pushMessage("ch1", "bar"); + $backend1->pushMessage("ch1", "asd"); + $this->assertEquals("foo", $backend1->popMessage("ch1", 1)); + $backend1->cleanupChannel("ch1"); + $this->assertEquals(null, $backend1->popMessage("ch1", 1)); + } } |