add brotli filter and tests
[m6w6/ext-http] / tests / encstream015.phpt
diff --git a/tests/encstream015.phpt b/tests/encstream015.phpt
new file mode 100644 (file)
index 0000000..f2fcf4b
--- /dev/null
@@ -0,0 +1,41 @@
+--TEST--
+encoding stream brotli static
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+<?php
+echo "Test\n";
+
+$file = file_get_contents(__FILE__);
+var_dump($file ===
+       http\Encoding\Stream\Debrotli::decode(
+               http\Encoding\Stream\Enbrotli::encode(
+                       $file, http\Encoding\Stream\Enbrotli::MODE_GENERIC
+               )
+       )
+);
+var_dump($file ===
+       http\Encoding\Stream\Debrotli::decode(
+               http\Encoding\Stream\Enbrotli::encode(
+                       $file, http\Encoding\Stream\Enbrotli::MODE_TEXT
+               )
+       )
+);
+var_dump($file ===
+       http\Encoding\Stream\Debrotli::decode(
+               http\Encoding\Stream\Enbrotli::encode(
+                       $file, http\Encoding\Stream\Enbrotli::MODE_FONT
+               )
+       )
+);
+
+?>
+DONE
+--EXPECT--
+Test
+bool(true)
+bool(true)
+bool(true)
+DONE