Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/documentserver_community.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2020-01-13 12:49:35 +0300
committerRobin Appelman <robin@icewind.nl>2020-01-13 12:49:35 +0300
commit31d6b887c892f60ba35919760e4feed775bb95ed (patch)
tree5d7466db88a5144334e9d9baed6769722fd35b4c /tests
parentb2b708eea8aaeb6a8690f0c832d88c046e262baa (diff)
ipc session cleanup
Diffstat (limited to 'tests')
-rw-r--r--tests/IPC/BackendTest.php11
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));
+ }
}