summaryrefslogtreecommitdiff
path: root/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt')
-rw-r--r--ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt32
1 files changed, 12 insertions, 20 deletions
diff --git a/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt b/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt
index 2637b15aee..106f5d7f49 100644
--- a/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt
+++ b/ext/fileinfo/tests/finfo_buffer_variation1-mb.phpt
@@ -4,39 +4,32 @@ Test finfo_buffer() function : basic functionality
<?php require_once(__DIR__ . '/skipif.inc'); ?>
--FILE--
<?php
-/* Prototype : string finfo_buffer(resource finfo, char *string [, int options [, resource context]])
- * Description: Return infromation about a string buffer.
- * Source code: ext/fileinfo/fileinfo.c
- * Alias to functions:
- */
-
$magicFile = __DIR__ . DIRECTORY_SEPARATOR . 'magic私はガラスを食べられます';
$options = array(
- FILEINFO_NONE,
- FILEINFO_MIME,
+ FILEINFO_NONE,
+ FILEINFO_MIME,
);
$buffers = array(
- "Regular string here",
- "\177ELF",
- "\000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003",
- "\x55\x7A\x6E\x61",
- "id=ImageMagick",
- "RIFFüîò^BAVI LISTv",
+ "Regular string here",
+ "\177ELF",
+ "\000\000\0001\000\000\0000\000\000\0000\000\000\0002\000\000\0000\000\000\0000\000\000\0003",
+ "\x55\x7A\x6E\x61",
+ "id=ImageMagick",
+ "RIFFüîò^BAVI LISTv",
);
echo "*** Testing finfo_buffer() : variation functionality with oo interface ***\n";
foreach( $options as $option ) {
- $finfo = new finfo( $option, $magicFile );
- foreach( $buffers as $string ) {
- var_dump( $finfo->buffer( $string, $option ) );
- }
+ $finfo = new finfo( $option, $magicFile );
+ foreach( $buffers as $string ) {
+ var_dump( $finfo->buffer( $string, $option ) );
+ }
}
?>
-===DONE===
--EXPECT--
*** Testing finfo_buffer() : variation functionality with oo interface ***
string(36) "ASCII text, with no line terminators"
@@ -51,4 +44,3 @@ string(40) "application/octet-stream; charset=binary"
string(28) "text/plain; charset=us-ascii"
string(28) "text/plain; charset=us-ascii"
string(25) "text/plain; charset=utf-8"
-===DONE===