+++ /dev/null
---TEST--
-object default error handling
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-var_dump(null === http\Object::getDefaultErrorHandling());
-http\Object::setDefaultErrorHandling(http\Object::EH_SUPPRESS);
-var_dump(http\Object::EH_SUPPRESS === http\Object::getDefaultErrorHandling());
-
-?>
-Done
---EXPECT--
-Test
-bool(true)
-bool(true)
-Done
+++ /dev/null
---TEST--
-object instance error handling
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-$eh = new eh;
-var_dump(null === $eh->getErrorHandling());
-$eh->setErrorHandling(eh::EH_SUPPRESS);
-var_dump(eh::EH_SUPPRESS === $eh->getErrorHandling());
-
-?>
-Done
---EXPECT--
-Test
-bool(true)
-bool(true)
-Done
+++ /dev/null
---TEST--
-object error suppression
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-http\Object::setDefaultErrorHandling(http\Object::EH_SUPPRESS);
-$o = new eh;
-$o->triggerError(E_USER_WARNING, http\Exception::E_UNKNOWN, "suppress");
-
-?>
-Done
---EXPECT--
-Test
-Done
+++ /dev/null
---TEST--
-object error exception
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-http\Object::setDefaultErrorHandling(http\Object::EH_THROW);
-$o = new eh;
-$o->triggerError(E_USER_WARNING, http\Exception::E_UNKNOWN, "exception");
-
-?>
-Done
---EXPECTF--
-Test
-
-Fatal error: Uncaught exception 'http\Exception' with message 'exception' in %s:%d
-Stack trace:
-#0 %s(%d): http\Object->triggerError(512, 0, 'exception')
-#1 {main}
- thrown in %s on line %d
+++ /dev/null
---TEST--
-object normal error
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-http\Object::setDefaultErrorHandling(http\Object::EH_NORMAL);
-$o = new eh;
-$o->triggerError(E_USER_WARNING, http\Exception::E_UNKNOWN, "warning");
-
-?>
-Done
---EXPECTF--
-Test
-
-Warning: http\Object::triggerError(): warning in %s on line %d
-Done
+++ /dev/null
---TEST--
-object error suppression2
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-$eh = new eh;
-$eh->setErrorHandling(http\Object::EH_SUPPRESS);
-$eh->triggerError(E_USER_WARNING, http\Exception::E_UNKNOWN, "suppress");
-
-?>
-Done
---EXPECTF--
-Test
-Done
+++ /dev/null
---TEST--
-object error exception2
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-$eh = new eh;
-$eh->setErrorHandling(http\Object::EH_THROW);
-$eh->triggerError(E_USER_WARNING, http\Exception::E_UNKNOWN, "exception");
-
-?>
-Done
---EXPECTF--
-Test
-
-Fatal error: Uncaught exception 'http\Exception' with message 'exception' in %s:%d
-Stack trace:
-#0 /home/mike/src/pecl_http-DEV_2.svn/tests/object007.php(9): http\Object->triggerError(512, 0, 'exception')
-#1 {main}
- thrown in %s on line %d
+++ /dev/null
---TEST--
-object normal error2
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-class eh extends http\Object {}
-
-$eh = new eh;
-$eh->setErrorHandling(http\Object::EH_NORMAL);
-$eh->triggerError(E_USER_WARNING, http\Exception::E_UNKNOWN, "warning");
-
-?>
-Done
---EXPECTF--
-Test
-
-Warning: http\Object::triggerError(): warning in %s on line %d
-Done
+++ /dev/null
---TEST--
-object unknown error handling
---SKIPIF--
-<?php
-include "skipif.inc";
-?>
---FILE--
-<?php
-
-echo "Test\n";
-
-http\Object::setDefaultErrorHandling(12345);
-
-class eh extends http\Object {}
-
-$eh = new eh;
-$eh->setErrorHandling(12345);
-
-?>
-Done
---EXPECTF--
-Test
-
-Warning: http\Object::setDefaultErrorHandling(): unknown error handling code (12345) in %s on line %d
-
-Warning: http\Object::setErrorHandling(): unknown error handling code (12345) in %s on line %d
-Done