summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-01-15 15:19:34 +0100
committerAleksander Machniak <alec@alec.pl>2014-01-15 15:19:34 +0100
commitf56ca13f7e3dd78b57cbd354458de13143e38f09 (patch)
tree2c7300369c38d1d0699f9731041f3c3480e2a33e /tests
parent18ff2e4ac68044d94ef9edf403b6638dc9a6b91a (diff)
Add more IMAP THREAD parser tests
Diffstat (limited to 'tests')
-rw-r--r--tests/Framework/ResultThread.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Framework/ResultThread.php b/tests/Framework/ResultThread.php
index ab55827ff..8f5c5092f 100644
--- a/tests/Framework/ResultThread.php
+++ b/tests/Framework/ResultThread.php
@@ -37,8 +37,25 @@ class Framework_ResultThread extends PHPUnit_Framework_TestCase
$this->assertSame(1719, $object->get_element('LAST'), "Get last element");
$this->assertSame(14, (int) $object->get_element(2), "Get specified element");
+ $clone = clone $object;
+ $clone->filter(array(7));
+ $clone = $clone->get_tree();
+
+ $this->assertSame(1, count($clone), "Structure check");
+ $this->assertSame(3, count($clone[7]), "Structure check");
+ $this->assertSame(0, count($clone[7][12]), "Structure check");
+ $this->assertSame(1, count($clone[7][167]), "Structure check");
+ $this->assertSame(0, count($clone[7][167][197]), "Structure check");
+ $this->assertSame(2, count($clone[7][458]), "Structure check");
+ $this->assertSame(1, count($clone[7][458][460]), "Structure check");
+ $this->assertSame(0, count($clone[7][458][460][463]), "Structure check");
+ $this->assertSame(1, count($clone[7][458][464]), "Structure check");
+ $this->assertSame(0, count($clone[7][458][464][471]), "Structure check");
+
$object->filter(array(784));
$this->assertSame(118, $object->count_messages(), "Messages filter");
$this->assertSame(1, $object->count(), "Messages filter (count)");
+
+//echo $object->get_compressed();
}
}