summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2009-05-23 15:37:36 +0000
committerFelipe Pena <felipe@php.net>2009-05-23 15:37:36 +0000
commit9708b01654f277c633f40161d8ea57f00b577d99 (patch)
treef58ce457d51dd5fc2ac4ed9c455ab83a3323724d
parent1498bb45c8ff42938f77d3b8ec2b284bff03c903 (diff)
downloadphp-git-9708b01654f277c633f40161d8ea57f00b577d99.tar.gz
- New tests (testfest NorthWestUG)
-rw-r--r--ext/spl/tests/DirectoryIterator_getBasename_basic_test.phpt23
-rw-r--r--ext/spl/tests/DirectoryIterator_getBasename_pass_array.phpt23
-rw-r--r--ext/spl/tests/SplArray_fromArray.phpt17
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_bottom_pass_array.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_bottom_pass_float.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_bottom_pass_integer.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_bottom_pass_null.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_count.phpt12
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_count_param_SplDoublyLinkedList.phpt11
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_current.phpt11
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_current_empty.phpt13
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_debug-info.phpt29
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_getIteratorMode.phpt12
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_getIteratorMode_error.phpt12
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_isEmpty_empty-with-parameter.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_isEmpty_empty.phpt13
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty-with-parameter.phpt20
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty.phpt19
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt23
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetExists_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetExists_success.phpt31
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetGet_empty.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetGet_missing_param.phpt15
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetGet_param_array.phpt18
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetGet_param_string.phpt18
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetSet_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetSet_one_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt27
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetUnset_negative-parameter.phpt23
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_offsetUnset_parameter-larger-num-elements.phpt23
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_pop_noParams.phpt15
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_pop_params.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_push_missing_parameter.phpt13
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_setIteratorMode_param_SplDoublyLinkedList.phpt11
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_shift_noParams.phpt15
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_top_pass_array.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_top_pass_float.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_top_pass_integer.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_top_pass_null.phpt14
-rw-r--r--ext/spl/tests/SplDoublyLinkedList_unshift_missing_parameter.phpt13
-rw-r--r--ext/spl/tests/SplDoublylinkedlist_offsetunset_first.phpt25
-rw-r--r--ext/spl/tests/SplDoublylinkedlist_offsetunset_first002.phpt17
-rw-r--r--ext/spl/tests/SplDoublylinkedlist_offsetunset_last.phpt25
-rw-r--r--ext/spl/tests/SplFixedArray__construct_param_array.phpt12
-rw-r--r--ext/spl/tests/SplFixedArray__construct_param_float.phpt14
-rw-r--r--ext/spl/tests/SplFixedArray__construct_param_null.phpt16
-rw-r--r--ext/spl/tests/SplFixedArray__construct_param_string.phpt12
-rw-r--r--ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt13
-rw-r--r--ext/spl/tests/SplFixedArray_count_checkParams.phpt16
-rw-r--r--ext/spl/tests/SplFixedArray_count_param_int.phpt11
-rw-r--r--ext/spl/tests/SplFixedArray_current_param.phpt24
-rw-r--r--ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_001.phpt10
-rw-r--r--ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_002.phpt10
-rw-r--r--ext/spl/tests/SplFixedArray_fromarray_indexes.phpt22
-rw-r--r--ext/spl/tests/SplFixedArray_fromarray_non_indexes.phpt21
-rw-r--r--ext/spl/tests/SplFixedArray_fromarray_param_boolean.phpt10
-rw-r--r--ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt17
-rw-r--r--ext/spl/tests/SplFixedArray_getSize_pass_param.phpt12
-rw-r--r--ext/spl/tests/SplFixedArray_key_param.phpt24
-rw-r--r--ext/spl/tests/SplFixedArray_key_setsize.phpt20
-rw-r--r--ext/spl/tests/SplFixedArray_next_param.phpt18
-rw-r--r--ext/spl/tests/SplFixedArray_offsetExists_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplFixedArray_offsetExists_less_than_zero.phpt13
-rw-r--r--ext/spl/tests/SplFixedArray_offsetGet_invalid_parameter.phpt16
-rw-r--r--ext/spl/tests/SplFixedArray_offsetSet_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplFixedArray_offsetSet_one_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt15
-rw-r--r--ext/spl/tests/SplFixedArray_offsetUnset_string.phpt33
-rw-r--r--ext/spl/tests/SplFixedArray_rewind_param.phpt18
-rw-r--r--ext/spl/tests/SplFixedArray_setSize_filled_to_smaller.phpt22
-rw-r--r--ext/spl/tests/SplFixedArray_setSize_param_array.phpt18
-rw-r--r--ext/spl/tests/SplFixedArray_setSize_param_float.phpt19
-rw-r--r--ext/spl/tests/SplFixedArray_setSize_param_null.phpt13
-rw-r--r--ext/spl/tests/SplFixedArray_setSize_reduce.phpt22
-rw-r--r--ext/spl/tests/SplFixedArray_setsize_001.phpt22
-rw-r--r--ext/spl/tests/SplFixedArray_setsize_grow.phpt30
-rw-r--r--ext/spl/tests/SplFixedArray_setsize_shrink.phpt28
-rw-r--r--ext/spl/tests/SplFixedArray_toArray_with-params.phpt19
-rw-r--r--ext/spl/tests/SplFixedarray_offsetExists_larger.phpt15
-rw-r--r--ext/spl/tests/SplHeap_count_invalid_parameter.phpt47
-rw-r--r--ext/spl/tests/SplHeap_extract_invalid_parameter.phpt47
-rw-r--r--ext/spl/tests/SplHeap_insert_invalid_parameter.phpt16
-rw-r--r--ext/spl/tests/SplHeap_isEmpty.phpt15
-rw-r--r--ext/spl/tests/SplHeap_isEmpty_invalid_parameter.phpt47
-rw-r--r--ext/spl/tests/SplObjectStorage_addAll_invalid_parameter.phpt43
-rw-r--r--ext/spl/tests/SplObjectStorage_attach_invalid_parameter.phpt20
-rw-r--r--ext/spl/tests/SplObjectStorage_contains_invalid_parameter.phpt43
-rw-r--r--ext/spl/tests/SplObjectStorage_current_empty_storage.phpt15
-rw-r--r--ext/spl/tests/SplObjectStorage_detach_invalid_parameter.phpt43
-rw-r--r--ext/spl/tests/SplObjectStorage_getInfo_empty_storage.phpt15
-rw-r--r--ext/spl/tests/SplObjectStorage_offsetGet.phpt17
-rw-r--r--ext/spl/tests/SplObjectStorage_offsetGet_invalid_parameter.phpt45
-rw-r--r--ext/spl/tests/SplObjectStorage_offsetGet_missing_object.phpt20
-rw-r--r--ext/spl/tests/SplObjectStorage_removeAll_invalid_parameter.phpt43
-rw-r--r--ext/spl/tests/SplObjectStorage_setInfo_empty_storage.phpt15
-rw-r--r--ext/spl/tests/SplObjectStorage_setInfo_invalid_parameter.phpt16
-rw-r--r--ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter1.phpt27
-rw-r--r--ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter2.phpt34
-rw-r--r--ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt19
-rw-r--r--ext/spl/tests/SplPriorityQueue_extract_invalid_parameter.phpt47
-rw-r--r--ext/spl/tests/SplPriorityQueue_insert_invalid_parameter.phpt16
-rw-r--r--ext/spl/tests/SplQueue_setIteratorMode.phpt15
-rw-r--r--ext/spl/tests/SplQueue_setIteratorMode_param_lifo.phpt19
-rw-r--r--ext/spl/tests/SplStack_setIteratorMode.phpt15
104 files changed, 2055 insertions, 0 deletions
diff --git a/ext/spl/tests/DirectoryIterator_getBasename_basic_test.phpt b/ext/spl/tests/DirectoryIterator_getBasename_basic_test.phpt
new file mode 100644
index 0000000000..ed1f473be9
--- /dev/null
+++ b/ext/spl/tests/DirectoryIterator_getBasename_basic_test.phpt
@@ -0,0 +1,23 @@
+--TEST--
+DirectoryIterator::getBasename() - Basic Test
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+ $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename');
+ mkdir($targetDir);
+ touch($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt');
+ $dir = new DirectoryIterator($targetDir.DIRECTORY_SEPARATOR);
+ while(!$dir->isFile()) {
+ $dir->next();
+ }
+ echo $dir->getBasename('.txt');
+?>
+--CLEAN--
+<?php
+ $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename');
+ unlink($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt');
+ rmdir($targetDir);
+?>
+--EXPECTF--
+getBasename_test
diff --git a/ext/spl/tests/DirectoryIterator_getBasename_pass_array.phpt b/ext/spl/tests/DirectoryIterator_getBasename_pass_array.phpt
new file mode 100644
index 0000000000..b2df8a55c9
--- /dev/null
+++ b/ext/spl/tests/DirectoryIterator_getBasename_pass_array.phpt
@@ -0,0 +1,23 @@
+--TEST--
+DirectoryIterator::getBasename() - Pass unexpected array
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+ $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename');
+ mkdir($targetDir);
+ touch($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt');
+ $dir = new DirectoryIterator($targetDir.DIRECTORY_SEPARATOR);
+ while(!$dir->isFile()) {
+ $dir->next();
+ }
+ echo $dir->getBasename(array());
+?>
+--CLEAN--
+<?php
+ $targetDir = __DIR__.DIRECTORY_SEPARATOR.md5('directoryIterator::getbasename');
+ unlink($targetDir.DIRECTORY_SEPARATOR.'getBasename_test.txt');
+ rmdir($targetDir);
+?>
+--EXPECTF--
+Warning: DirectoryIterator::getBasename() expects parameter 1 to be %binary_string_optional%, array given in %s on line %d
diff --git a/ext/spl/tests/SplArray_fromArray.phpt b/ext/spl/tests/SplArray_fromArray.phpt
new file mode 100644
index 0000000000..1144f5f8dc
--- /dev/null
+++ b/ext/spl/tests/SplArray_fromArray.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Check that SplArray::fromArray will not allow integer overflows
+--CREDITS--
+Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
+--FILE--
+<?php
+$array = array(PHP_INT_MAX => 'foo');
+$splArray = new SplFixedArray();
+
+try {
+ $splArray->fromArray($array);
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECT--
+integer overflow detected \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_bottom_pass_array.phpt b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_array.phpt
new file mode 100644
index 0000000000..36b186d6b7
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_array.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::bottom() - pass in an unexpected array parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->bottom(array());
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::bottom() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_bottom_pass_float.phpt b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_float.phpt
new file mode 100644
index 0000000000..94312a0f60
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_float.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::bottom() - pass in an unexpected float parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->bottom(3.14159);
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::bottom() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_bottom_pass_integer.phpt b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_integer.phpt
new file mode 100644
index 0000000000..651f1e4382
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_integer.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::bottom() - pass in an unexpected integer parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->bottom(45);
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::bottom() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_bottom_pass_null.phpt b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_null.phpt
new file mode 100644
index 0000000000..efc6b8ae50
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_bottom_pass_null.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::bottom() - pass in an unexpected null parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->bottom(null);
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::bottom() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_count.phpt b/ext/spl/tests/SplDoublyLinkedList_count.phpt
new file mode 100644
index 0000000000..72b029cce4
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_count.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Check that SplDoublyLinkedList::count fails if parameter passed in
+--CREDITS--
+Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+
+$c = $list->count('foo');
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::count() expects exactly 0 parameters, 1 given in %s on line 4
diff --git a/ext/spl/tests/SplDoublyLinkedList_count_param_SplDoublyLinkedList.phpt b/ext/spl/tests/SplDoublyLinkedList_count_param_SplDoublyLinkedList.phpt
new file mode 100644
index 0000000000..36c72de191
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_count_param_SplDoublyLinkedList.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Create a SplDoublyLinkedList, call count() and pass a SplDoublyLinkedList object as the parameter.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$dll = new SplDoublyLinkedList(2);
+$dll->count(new SplDoublyLinkedList(2));
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::count() expects exactly 0 parameters, 1 given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_current.phpt b/ext/spl/tests/SplDoublyLinkedList_current.phpt
new file mode 100644
index 0000000000..3e13a6b7f9
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_current.phpt
@@ -0,0 +1,11 @@
+--TEST--
+SplDoublyLinkedList getIteratorMode
+--CREDITS--
+PHPNW Testfest 2009 - Lorna Mitchell
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+var_dump($list->current());
+?>
+--EXPECT--
+NULL
diff --git a/ext/spl/tests/SplDoublyLinkedList_current_empty.phpt b/ext/spl/tests/SplDoublyLinkedList_current_empty.phpt
new file mode 100644
index 0000000000..558504b38b
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_current_empty.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Run current() function on an empty SplDoublyLinkedList.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+var_dump($list->current());
+
+?>
+--EXPECT--
+NULL \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_debug-info.phpt b/ext/spl/tests/SplDoublyLinkedList_debug-info.phpt
new file mode 100644
index 0000000000..3164b42206
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_debug-info.phpt
@@ -0,0 +1,29 @@
+--TEST--
+Check that SplDoublyLinkedList returns debug info when print_r is used.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ // Add some items to the list
+ $dll->push(1);
+ $dll->push(2);
+ $dll->push(3);
+
+ // Check the debug info
+ print_r($dll);
+?>
+--EXPECT--
+SplDoublyLinkedList Object
+(
+ [flags:SplDoublyLinkedList:private] => 0
+ [dllist:SplDoublyLinkedList:private] => Array
+ (
+ [0] => 1
+ [1] => 2
+ [2] => 3
+ )
+
+)
diff --git a/ext/spl/tests/SplDoublyLinkedList_getIteratorMode.phpt b/ext/spl/tests/SplDoublyLinkedList_getIteratorMode.phpt
new file mode 100644
index 0000000000..d1bfb46de3
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_getIteratorMode.phpt
@@ -0,0 +1,12 @@
+--TEST--
+SplDoublyLinkedList getIteratorMode
+--CREDITS--
+PHPNW Testfest 2009 - Lorna Mitchell
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$list->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO | SplDoublyLinkedList::IT_MODE_KEEP);
+echo $list->getIteratorMode();
+?>
+--EXPECT--
+0
diff --git a/ext/spl/tests/SplDoublyLinkedList_getIteratorMode_error.phpt b/ext/spl/tests/SplDoublyLinkedList_getIteratorMode_error.phpt
new file mode 100644
index 0000000000..cb43bee1ce
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_getIteratorMode_error.phpt
@@ -0,0 +1,12 @@
+--TEST--
+SplDoublyLinkedList getIteratorMode with an unexpected parameter
+--CREDITS--
+PHPNW Testfest 2009 - Lorna Mitchell
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$list->getIteratorMode(24);
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::getIteratorMode() expects exactly 0 parameters, 1 given in %s on line %d
+
diff --git a/ext/spl/tests/SplDoublyLinkedList_isEmpty_empty-with-parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_isEmpty_empty-with-parameter.phpt
new file mode 100644
index 0000000000..8d7aaf8c93
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_isEmpty_empty-with-parameter.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Check that SplDoublyLinkedList->isEmpty() returns an error message when a parameter is passed.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ var_dump($dll->isEmpty("test"));
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::isEmpty() expects exactly 0 parameters, %d given in %s
+NULL \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_isEmpty_empty.phpt b/ext/spl/tests/SplDoublyLinkedList_isEmpty_empty.phpt
new file mode 100644
index 0000000000..f129385d07
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_isEmpty_empty.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Check that SplDoublyLinkedList->isEmpty() correctly returns true for an empty list.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ var_dump($dll->isEmpty());
+?>
+--EXPECT--
+bool(true)
diff --git a/ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty-with-parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty-with-parameter.phpt
new file mode 100644
index 0000000000..6ea9198bf0
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty-with-parameter.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Check that SplDoublyLinkedList->isEmpty() returns an error message when a parameter is passed.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ // Add some items to the list
+ $dll->push(1);
+ $dll->push(2);
+ $dll->push(3);
+ //var_dump($dll);
+
+ var_dump($dll->isEmpty("test"));
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::isEmpty() expects exactly 0 parameters, %d given in %s
+NULL \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty.phpt b/ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty.phpt
new file mode 100644
index 0000000000..cac1866bc1
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_isEmpty_not-empty.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Check that SplDoublyLinkedList->isEmpty() correctly returns true for a non-empty list.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ // Add some items to the list
+ $dll->push(1);
+ $dll->push(2);
+ $dll->push(3);
+ //var_dump($dll);
+
+ var_dump($dll->isEmpty());
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt b/ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt
new file mode 100644
index 0000000000..86a84567a8
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_lifoMode.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Check that SplDoublyLinkedList can traverse backwards
+--CREDITS--
+Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+
+$list->push('o');
+$list->push('o');
+$list->push('f');
+
+$list->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
+
+$list->rewind();
+
+while ($tmp = $list->current()) {
+ echo $tmp;
+ $list->next();
+}
+?>
+--EXPECT--
+foo \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetExists_invalid_parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetExists_invalid_parameter.phpt
new file mode 100644
index 0000000000..f0e1b8ba14
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetExists_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SPL SplDoublyLinkedList offsetExists displays warning and returns null on no parameters
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$a = $list->offsetExists();
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::offsetExists() expects exactly 1 parameter, 0 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetExists_success.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetExists_success.phpt
new file mode 100644
index 0000000000..0399b4948d
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetExists_success.phpt
@@ -0,0 +1,31 @@
+--TEST--
+SPL SplDoublyLinkedList offsetExists returns correct values
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+
+// Push two values onto the list
+$list->push('abc');
+$list->push('def');
+
+// Validate that we can see the first value
+if($list->offsetExists(0) === true) {
+ echo "PASS\n";
+}
+
+// Validate that we can see the second value
+if($list->offsetExists(1) === true) {
+ echo "PASS\n";
+}
+
+// Check that there is no third value
+if($list->offsetExists(2) === false) {
+ echo "PASS\n";
+}
+?>
+--EXPECTF--
+PASS
+PASS
+PASS
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetGet_empty.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetGet_empty.phpt
new file mode 100644
index 0000000000..36c47fef2e
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetGet_empty.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::offsetGet() with no parameter passed.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplDoublyLinkedList( );
+
+$get = $array->offsetGet();
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::offsetGet() expects exactly 1 parameter, 0 given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetGet_missing_param.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetGet_missing_param.phpt
new file mode 100644
index 0000000000..beffe7ad87
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetGet_missing_param.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Tests that the offsetGet() method throws an error when no argument is sent
+--CREDITS--
+PHPNW Test Fest 2009 - Rick Ogden
+--FILE--
+<?php
+$dll = new SplDoublyLinkedList();
+$dll->push(1);
+$dll->push(2);
+
+var_dump($dll->offsetGet());
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::offsetGet() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetGet_param_array.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetGet_param_array.phpt
new file mode 100644
index 0000000000..5df4ab59a5
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetGet_param_array.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SplDoublyLinkedList::offsetGet() with 1st parameter passed as array.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplDoublyLinkedList( );
+
+$get = $array->offsetGet( array( 'fail' ) );
+
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'OutOfRangeException' with message 'Offset invalid or out of range' in %s
+Stack trace:
+#0 %s
+#1 {main}
+ thrown in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetGet_param_string.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetGet_param_string.phpt
new file mode 100644
index 0000000000..fcff762e6b
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetGet_param_string.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SplDoublyLinkedList::offsetGet() with 1st parameter passed as string.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplDoublyLinkedList( );
+
+$get = $array->offsetGet( 'fail' );
+
+?>
+--EXPECTF--
+Fatal error: Uncaught exception 'OutOfRangeException' with message 'Offset invalid or out of range' in %s
+Stack trace:
+#0 %s
+#1 {main}
+ thrown in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetSet_invalid_parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetSet_invalid_parameter.phpt
new file mode 100644
index 0000000000..2447e798a1
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetSet_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SplDoublyLinkedList offsetSet throws error on no parameters
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$a = $list->offsetSet();
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::offsetSet() expects exactly 2 parameters, 0 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetSet_one_invalid_parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetSet_one_invalid_parameter.phpt
new file mode 100644
index 0000000000..244dcd5b03
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetSet_one_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SplDoublyLinkedList offsetSet throws error only one parameter
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$a = $list->offsetSet(2);
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::offsetSet() expects exactly 2 parameters, 1 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt
new file mode 100644
index 0000000000..687fcad78c
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetUnset_greater_than_elements.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Doubly Linked List - offsetUnset > number elements
+
+--CREDITS--
+PHPNW Test Fest 2009 - Mat Griffin
+
+--FILE--
+<?php
+$ll = new SplDoublyLinkedList();
+
+$ll->push('1');
+$ll->push('2');
+$ll->push('3');
+
+try {
+
+$ll->offsetUnset($ll->count() + 1);
+
+var_dump($ll);
+
+} catch(Exception $e) {
+echo $e->getMessage();
+}
+
+?>
+--EXPECT--
+Offset out of range
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetUnset_negative-parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetUnset_negative-parameter.phpt
new file mode 100644
index 0000000000..d3d1d7d9a9
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetUnset_negative-parameter.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Check that SplDoublyLinkedList->offsetUnset() returns an error message when the offset is < 0.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ // Add some items to the list
+ $dll->push(1);
+ $dll->push(2);
+ $dll->push(3);
+
+ try {
+ $dll->offsetUnset(-1);
+ }
+ catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+?>
+--EXPECT--
+Offset out of range
diff --git a/ext/spl/tests/SplDoublyLinkedList_offsetUnset_parameter-larger-num-elements.phpt b/ext/spl/tests/SplDoublyLinkedList_offsetUnset_parameter-larger-num-elements.phpt
new file mode 100644
index 0000000000..aea73b93b4
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_offsetUnset_parameter-larger-num-elements.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Check that SplDoublyLinkedList->offsetUnset() returns an error message when the offset is > elements.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a new Doubly Linked List
+ $dll = new SplDoublyLinkedList();
+
+ // Add some items to the list
+ $dll->push(1);
+ $dll->push(2);
+ $dll->push(3);
+
+ try {
+ $dll->offsetUnset(3);
+ }
+ catch (Exception $e) {
+ echo $e->getMessage() . "\n";
+ }
+?>
+--EXPECT--
+Offset out of range
diff --git a/ext/spl/tests/SplDoublyLinkedList_pop_noParams.phpt b/ext/spl/tests/SplDoublyLinkedList_pop_noParams.phpt
new file mode 100644
index 0000000000..64f3a48150
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_pop_noParams.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Checks that the pop() method of DoublyLinkedList does not accept args.
+--CREDITS--
+PHPNW Test Fest 2009 - Rick Ogden
+--FILE--
+<?php
+$ll = new SplDoublyLinkedList();
+$ll->push(1);
+$ll->push(2);
+
+var_dump($ll->pop(1));
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::pop() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
diff --git a/ext/spl/tests/SplDoublyLinkedList_pop_params.phpt b/ext/spl/tests/SplDoublyLinkedList_pop_params.phpt
new file mode 100644
index 0000000000..11ab343dbe
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_pop_params.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::offsetGet() with no parameter passed.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplDoublyLinkedList( );
+
+$get = $array->pop( 'param' );
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::pop() expects exactly 0 parameters, 1 given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_push_missing_parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_push_missing_parameter.phpt
new file mode 100644
index 0000000000..057751c2eb
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_push_missing_parameter.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Check that SplDoublyLinkedList::push generate a warning and return NULL with missing param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+$dll = new SplDoublyLinkedList();
+var_dump($dll->push());
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::push() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplDoublyLinkedList_setIteratorMode_param_SplDoublyLinkedList.phpt b/ext/spl/tests/SplDoublyLinkedList_setIteratorMode_param_SplDoublyLinkedList.phpt
new file mode 100644
index 0000000000..9bf7a32007
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_setIteratorMode_param_SplDoublyLinkedList.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Create a SplDoublyLinkedList, call setIteratorMode() and pass a SplDoublyLinkedList object as the parameter.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$dll = new SplDoublyLinkedList(2);
+$dll->setIteratorMode(new SplDoublyLinkedList(2));
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::setIteratorMode() expects parameter 1 to be long, object given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplDoublyLinkedList_shift_noParams.phpt b/ext/spl/tests/SplDoublyLinkedList_shift_noParams.phpt
new file mode 100644
index 0000000000..cd4ea5b033
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_shift_noParams.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Checks that the shift() method of DoublyLinkedList does not accept args.
+--CREDITS--
+PHPNW Test Fest 2009 - Rick Ogden
+--FILE--
+<?php
+$ll = new SplDoublyLinkedList();
+$ll->push(1);
+$ll->push(2);
+
+var_dump($ll->shift(1));
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::shift() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
diff --git a/ext/spl/tests/SplDoublyLinkedList_top_pass_array.phpt b/ext/spl/tests/SplDoublyLinkedList_top_pass_array.phpt
new file mode 100644
index 0000000000..2e2632d39a
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_top_pass_array.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::top() - pass in an unexpected array
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->top(array());
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::top() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_top_pass_float.phpt b/ext/spl/tests/SplDoublyLinkedList_top_pass_float.phpt
new file mode 100644
index 0000000000..0a481b85a0
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_top_pass_float.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::top() - pass in an unexpected float parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->top(3.14159);
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::top() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_top_pass_integer.phpt b/ext/spl/tests/SplDoublyLinkedList_top_pass_integer.phpt
new file mode 100644
index 0000000000..72bdbabc3d
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_top_pass_integer.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::top() - pass in an unexpected integer parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->top(45);
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::top() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_top_pass_null.phpt b/ext/spl/tests/SplDoublyLinkedList_top_pass_null.phpt
new file mode 100644
index 0000000000..6a92399739
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_top_pass_null.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplDoublyLinkedList::top() - pass in an unexpected null parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+
+$list = new SplDoublyLinkedList();
+$list->push("top");
+$list->top(null);
+
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::top() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplDoublyLinkedList_unshift_missing_parameter.phpt b/ext/spl/tests/SplDoublyLinkedList_unshift_missing_parameter.phpt
new file mode 100644
index 0000000000..18afa034bb
--- /dev/null
+++ b/ext/spl/tests/SplDoublyLinkedList_unshift_missing_parameter.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Check that SplDoublyLinkedList::unshift generate a warning and return NULL with missing param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+$dll = new SplDoublyLinkedList();
+var_dump($dll->unshift());
+?>
+--EXPECTF--
+Warning: SplDoublyLinkedList::unshift() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplDoublylinkedlist_offsetunset_first.phpt b/ext/spl/tests/SplDoublylinkedlist_offsetunset_first.phpt
new file mode 100644
index 0000000000..4dce4db8de
--- /dev/null
+++ b/ext/spl/tests/SplDoublylinkedlist_offsetunset_first.phpt
@@ -0,0 +1,25 @@
+--TEST--
+SPL: SplDoublyLinkedList : offsetUnset - first element
+--CREDITS--
+PHPNW TestFest2009 - Rowan Merewood <rowan@merewood.org>
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$list->push('oh');
+$list->push('hai');
+$list->push('thar');
+$list->offsetUnset(0);
+var_dump($list);
+?>
+--EXPECTF--
+object(SplDoublyLinkedList)#1 (2) {
+ [%u|b%"flags":%u|b%"SplDoublyLinkedList":private]=>
+ int(0)
+ [%u|b%"dllist":%u|b%"SplDoublyLinkedList":private]=>
+ array(2) {
+ [0]=>
+ %string|unicode%(3) "hai"
+ [1]=>
+ %string|unicode%(4) "thar"
+ }
+}
diff --git a/ext/spl/tests/SplDoublylinkedlist_offsetunset_first002.phpt b/ext/spl/tests/SplDoublylinkedlist_offsetunset_first002.phpt
new file mode 100644
index 0000000000..a42e6f9040
--- /dev/null
+++ b/ext/spl/tests/SplDoublylinkedlist_offsetunset_first002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+SPL: SplDoublyLinkedList : offsetUnset - first element
+--CREDITS--
+PHPNW TestFest2009 - Rowan Merewood <rowan@merewood.org>
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$list->push('oh');
+$list->push('hai');
+$list->push('thar');
+echo $list->bottom() . "\n";
+$list->offsetUnset(0);
+echo $list->bottom() . "\n";
+?>
+--EXPECT--
+oh
+hai
diff --git a/ext/spl/tests/SplDoublylinkedlist_offsetunset_last.phpt b/ext/spl/tests/SplDoublylinkedlist_offsetunset_last.phpt
new file mode 100644
index 0000000000..0f5dac19f9
--- /dev/null
+++ b/ext/spl/tests/SplDoublylinkedlist_offsetunset_last.phpt
@@ -0,0 +1,25 @@
+--TEST--
+SPL: SplDoublyLinkedList : offsetUnset - last element
+--CREDITS--
+PHPNW TestFest2009 - Rowan Merewood <rowan@merewood.org>
+--FILE--
+<?php
+$list = new SplDoublyLinkedList();
+$list->push('oh');
+$list->push('hai');
+$list->push('thar');
+$list->offsetUnset(2);
+var_dump($list);
+?>
+--EXPECTF--
+object(SplDoublyLinkedList)#1 (2) {
+ [%u|b%"flags":%u|b%"SplDoublyLinkedList":private]=>
+ int(0)
+ [%u|b%"dllist":%u|b%"SplDoublyLinkedList":private]=>
+ array(2) {
+ [0]=>
+ %string|unicode%(2) "oh"
+ [1]=>
+ %string|unicode%(3) "hai"
+ }
+}
diff --git a/ext/spl/tests/SplFixedArray__construct_param_array.phpt b/ext/spl/tests/SplFixedArray__construct_param_array.phpt
new file mode 100644
index 0000000000..d63d7cca54
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray__construct_param_array.phpt
@@ -0,0 +1,12 @@
+--TEST--
+SplFixedArray::__construct() with array passed as integer.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( array("string", 1) );
+
+?>
+--EXPECTF--
+Warning: SplFixedArray::__construct() expects parameter 1 to be long, array given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray__construct_param_float.phpt b/ext/spl/tests/SplFixedArray__construct_param_float.phpt
new file mode 100644
index 0000000000..670a1095eb
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray__construct_param_float.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SplFixedArray::__construct() with float passed as parameter.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( 3.141 );
+
+echo $array->getSize();
+
+?>
+--EXPECT--
+3 \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray__construct_param_null.phpt b/ext/spl/tests/SplFixedArray__construct_param_null.phpt
new file mode 100644
index 0000000000..3b1543d4dc
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray__construct_param_null.phpt
@@ -0,0 +1,16 @@
+--TEST--
+SplFixedArray::__construct() with null passed as parameter.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( NULL );
+
+print_r( $array );
+
+?>
+--EXPECTF--
+SplFixedArray Object
+(
+) \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray__construct_param_string.phpt b/ext/spl/tests/SplFixedArray__construct_param_string.phpt
new file mode 100644
index 0000000000..3a7e734b06
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray__construct_param_string.phpt
@@ -0,0 +1,12 @@
+--TEST--
+SplFixedArray::__construct() with string passed as parameter.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( "string" );
+
+?>
+--EXPECTF--
+Warning: SplFixedArray::__construct() expects parameter 1 to be long, %unicode_string_optional% given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt
new file mode 100644
index 0000000000..6582f847bd
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_construct_param_SplFixedArray.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Create an SplFixedArray using an SplFixedArray object.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = new SplFixedArray(new SplFixedArray(3));
+var_dump($array);
+?>
+--EXPECTF--
+Warning: SplFixedArray::__construct() expects parameter 1 to be long, object given in %s on line %d
+object(SplFixedArray)#1 (0) {
+} \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray_count_checkParams.phpt b/ext/spl/tests/SplFixedArray_count_checkParams.phpt
new file mode 100644
index 0000000000..5cbe2e80ce
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_count_checkParams.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Makes sure that an integer cannot be passed into the count() method of the splFixedArray.
+--CREDITS--
+PHPNW Test Fest 2009 - Rick Ogden
+--FILE--
+<?php
+$ar = new SplFixedArray(3);
+$ar[0] = 1;
+$ar[1] = 2;
+$ar[2] = 3;
+
+echo $ar->count(3);
+?>
+--EXPECTF--
+Warning: SplFixedArray::count() expects exactly 0 parameters, 1 given in %s on line %d
+
diff --git a/ext/spl/tests/SplFixedArray_count_param_int.phpt b/ext/spl/tests/SplFixedArray_count_param_int.phpt
new file mode 100644
index 0000000000..108bb2db69
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_count_param_int.phpt
@@ -0,0 +1,11 @@
+--TEST--
+Creates array, uses the count function to get the size of the array, but passes a parameter.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+echo $array->count(3);
+?>
+--EXPECTF--
+Warning: SplFixedArray::count() expects exactly 0 parameters, 1 given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray_current_param.phpt b/ext/spl/tests/SplFixedArray_current_param.phpt
new file mode 100644
index 0000000000..71f5d3a524
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_current_param.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SplFixedArray::current() with a parameter. *BUG*
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( 3 );
+
+$array[0] = "Hello";
+$array[1] = "world";
+$array[2] = "elePHPant";
+
+foreach ( $array as $value ) {
+ echo $array->current( array("this","should","not","execute") );
+}
+
+?>
+--EXPECTF--
+Warning: SplFixedArray::current() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: SplFixedArray::current() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: SplFixedArray::current() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_001.phpt b/ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_001.phpt
new file mode 100644
index 0000000000..36ecf46453
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_001.phpt
@@ -0,0 +1,10 @@
+--TEST--
+pass an integer into fromArray()
+--CREDITS--
+PHPNW Testfest 2009 - Lorna Mitchell
+--FILE--
+<?php
+echo SplFixedArray::fromArray(17954);
+?>
+--EXPECTF--
+Warning: SplFixedArray::fromArray() expects parameter 1 to be array, integer given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_002.phpt b/ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_002.phpt
new file mode 100644
index 0000000000..ba81428aff
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_fromArray_invalid_parameter_002.phpt
@@ -0,0 +1,10 @@
+--TEST--
+pass a string into fromArray()
+--CREDITS--
+PHPNW Testfest 2009 - Lorna Mitchell
+--FILE--
+<?php
+echo SplFixedArray::fromArray('hello');
+?>
+--EXPECTF--
+Warning: SplFixedArray::fromArray() expects parameter 1 to be array, %unicode_string_optional% given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_fromarray_indexes.phpt b/ext/spl/tests/SplFixedArray_fromarray_indexes.phpt
new file mode 100644
index 0000000000..034d457318
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_fromarray_indexes.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Create a SplFixedArray from an array using the fromArray() function use the default behaviour of preserve the indexes.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = SplFixedArray::fromArray(array(1 => 1,
+ 2 => '2',
+ 3 => false));
+var_dump($array);
+?>
+--EXPECTF--
+object(SplFixedArray)#1 (4) {
+ [0]=>
+ NULL
+ [1]=>
+ int(1)
+ [2]=>
+ %string|unicode%(1) "2"
+ [3]=>
+ bool(false)
+}
diff --git a/ext/spl/tests/SplFixedArray_fromarray_non_indexes.phpt b/ext/spl/tests/SplFixedArray_fromarray_non_indexes.phpt
new file mode 100644
index 0000000000..ecae2ab762
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_fromarray_non_indexes.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Create a SplFixedArray from an array using the fromArray() function don't try to preserve the indexes.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = SplFixedArray::fromArray(array(1 => 1,
+ 2 => '2',
+ 3 => false),
+ false);
+var_dump($array);
+?>
+--EXPECTF--
+object(SplFixedArray)#1 (3) {
+ [0]=>
+ int(1)
+ [1]=>
+ %string|unicode%(1) "2"
+ [2]=>
+ bool(false)
+}
diff --git a/ext/spl/tests/SplFixedArray_fromarray_param_boolean.phpt b/ext/spl/tests/SplFixedArray_fromarray_param_boolean.phpt
new file mode 100644
index 0000000000..80d966997b
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_fromarray_param_boolean.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Tries to create a SplFixedArray using a boolean value.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = SplFixedArray::fromArray(true);
+?>
+--EXPECTF--
+Warning: SplFixedArray::fromArray() expects parameter 1 to be array, boolean given in %s on line %d \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt b/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt
new file mode 100644
index 0000000000..f57fe78fb8
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_fromarray_param_multiarray.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Tries to create a SplFixedArray using the fromArray() function and a multi dimentional array.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = SplFixedArray::fromArray(array(array('1')));
+var_dump($array);
+?>
+--EXPECTF--
+object(SplFixedArray)#1 (1) {
+ [0]=>
+ array(1) {
+ [0]=>
+ %string|unicode%(1) "1"
+ }
+}
diff --git a/ext/spl/tests/SplFixedArray_getSize_pass_param.phpt b/ext/spl/tests/SplFixedArray_getSize_pass_param.phpt
new file mode 100644
index 0000000000..ef4f40c32f
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_getSize_pass_param.phpt
@@ -0,0 +1,12 @@
+--TEST--
+SplFixedArray::getSize() pass a parameter when none are expected
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+$fixed_array = new SplFixedArray(2);
+echo "*test* ".$fixed_array->getSize(3);
+?>
+--EXPECTF--
+Warning: SplFixedArray::getSize() expects exactly 0 parameters, 1 given in %s on line %d
+*test*
diff --git a/ext/spl/tests/SplFixedArray_key_param.phpt b/ext/spl/tests/SplFixedArray_key_param.phpt
new file mode 100644
index 0000000000..300e6df790
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_key_param.phpt
@@ -0,0 +1,24 @@
+--TEST--
+SplFixedArray::key() with a parameter passed. This is a bug and an error should be called.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( 3 );
+
+$array[0] = "Hello";
+$array[1] = "world";
+$array[2] = "elePHPant";
+
+foreach ( $array as $value ) {
+ echo $array->key( array("this","should","not","execute") );
+}
+
+?>
+--EXPECTF--
+Warning: SplFixedArray::key() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: SplFixedArray::key() expects exactly 0 parameters, 1 given in %s on line %d
+
+Warning: SplFixedArray::key() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_key_setsize.phpt b/ext/spl/tests/SplFixedArray_key_setsize.phpt
new file mode 100644
index 0000000000..97e48115fb
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_key_setsize.phpt
@@ -0,0 +1,20 @@
+--TEST--
+SplFixedArray::key() when the array has a size higher than the amount of values specified.
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( 4 );
+
+$array[0] = "Hello";
+$array[1] = "world";
+$array[2] = "elePHPant";
+
+foreach ( $array as $value ) {
+ echo $array->key( );
+}
+
+?>
+--EXPECT--
+0123 \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray_next_param.phpt b/ext/spl/tests/SplFixedArray_next_param.phpt
new file mode 100644
index 0000000000..5e8cb633b9
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_next_param.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SplFixedArray::next() with a parameter. *BUG*
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( 4 );
+
+$array[0] = "Hello";
+$array[1] = "world";
+$array[2] = "elePHPant";
+
+$array->next( "invalid" );
+
+?>
+--EXPECTF--
+Warning: SplFixedArray::next() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_offsetExists_invalid_parameter.phpt b/ext/spl/tests/SplFixedArray_offsetExists_invalid_parameter.phpt
new file mode 100644
index 0000000000..76ee2f58ad
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetExists_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SPL FixedArray offsetExists throws error only one parameter
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$a = $array->offsetExists();
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplFixedArray::offsetExists() expects exactly 1 parameter, 0 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplFixedArray_offsetExists_less_than_zero.phpt b/ext/spl/tests/SplFixedArray_offsetExists_less_than_zero.phpt
new file mode 100644
index 0000000000..9bfda34073
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetExists_less_than_zero.phpt
@@ -0,0 +1,13 @@
+--TEST--
+SPL FixedArray offsetExists behaviour on a negative index
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+if($array->offsetExists(-10) === false) {
+ echo 'PASS';
+}
+?>
+--EXPECT--
+PASS
diff --git a/ext/spl/tests/SplFixedArray_offsetGet_invalid_parameter.phpt b/ext/spl/tests/SplFixedArray_offsetGet_invalid_parameter.phpt
new file mode 100644
index 0000000000..71a1bf80f2
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetGet_invalid_parameter.phpt
@@ -0,0 +1,16 @@
+--TEST--
+SPL FixedArray offsetGet throws error on no parameter
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$array[0] = 'a';
+$a = $array->offsetGet();
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplFixedArray::offsetGet() expects exactly 1 parameter, 0 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplFixedArray_offsetSet_invalid_parameter.phpt b/ext/spl/tests/SplFixedArray_offsetSet_invalid_parameter.phpt
new file mode 100644
index 0000000000..4e43a525fc
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetSet_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SPL FixedArray offsetSet throws error on no parameters
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$a = $array->offsetSet();
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplFixedArray::offsetSet() expects exactly 2 parameters, 0 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplFixedArray_offsetSet_one_invalid_parameter.phpt b/ext/spl/tests/SplFixedArray_offsetSet_one_invalid_parameter.phpt
new file mode 100644
index 0000000000..c19cd01763
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetSet_one_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SPL FixedArray offsetSet throws error only one parameter
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$a = $array->offsetSet(2);
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplFixedArray::offsetSet() expects exactly 2 parameters, 1 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt b/ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt
new file mode 100644
index 0000000000..40a372bd91
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetUnset_invalid_parameter.phpt
@@ -0,0 +1,15 @@
+--TEST--
+SPL FixedArray offsetUnset throws error on no parameter
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$a = $array->offsetUnset();
+if(is_null($a)) {
+ echo 'PASS';
+}
+?>
+--EXPECTF--
+Warning: SplFixedArray::offsetUnset() expects exactly 1 parameter, 0 given in %s on line %d
+PASS
diff --git a/ext/spl/tests/SplFixedArray_offsetUnset_string.phpt b/ext/spl/tests/SplFixedArray_offsetUnset_string.phpt
new file mode 100644
index 0000000000..21976b552c
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_offsetUnset_string.phpt
@@ -0,0 +1,33 @@
+--TEST--
+Check removing an item from an array when the offset is not an integer.
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a fixed array
+ $fixedArray = new SplFixedArray(5);
+
+ // Fill it up
+ for ($i=0; $i < 5; $i++) {
+ $fixedArray[$i] = "PHPNW Testfest";
+ }
+
+ // remove an item
+ $fixedArray->offsetUnset("4");
+
+ var_dump($fixedArray);
+
+?>
+--EXPECTF--
+object(SplFixedArray)#1 (5) {
+ [0]=>
+ %string|unicode%(14) "PHPNW Testfest"
+ [1]=>
+ %string|unicode%(14) "PHPNW Testfest"
+ [2]=>
+ %string|unicode%(14) "PHPNW Testfest"
+ [3]=>
+ %string|unicode%(14) "PHPNW Testfest"
+ [4]=>
+ NULL
+}
diff --git a/ext/spl/tests/SplFixedArray_rewind_param.phpt b/ext/spl/tests/SplFixedArray_rewind_param.phpt
new file mode 100644
index 0000000000..7002efb313
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_rewind_param.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SplFixedArray::rewind() with a parameter. *BUG*
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+$array = new SplFixedArray( 4 );
+
+$array[0] = "Hello";
+$array[1] = "world";
+$array[2] = "elePHPant";
+
+$array->rewind( "invalid" );
+
+?>
+--EXPECTF--
+Warning: SplFixedArray::rewind() expects exactly 0 parameters, 1 given in %s on line %d
diff --git a/ext/spl/tests/SplFixedArray_setSize_filled_to_smaller.phpt b/ext/spl/tests/SplFixedArray_setSize_filled_to_smaller.phpt
new file mode 100644
index 0000000000..a460747608
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setSize_filled_to_smaller.phpt
@@ -0,0 +1,22 @@
+--TEST--
+Create array, fills it with and resizes it to lower value.
+--CREDITS--
+Philip Norton philipnorton42@gmail.com
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$array[0] = 1;
+$array[1] = 1;
+$array[2] = 1;
+$array[3] = 1;
+$array[4] = 1;
+$array->setSize(2);
+var_dump($array);
+?>
+--EXPECT--
+object(SplFixedArray)#1 (2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+} \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray_setSize_param_array.phpt b/ext/spl/tests/SplFixedArray_setSize_param_array.phpt
new file mode 100644
index 0000000000..269a45de1b
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setSize_param_array.phpt
@@ -0,0 +1,18 @@
+--TEST--
+SplFixedArray::setSize() with an array parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+$fixed_array = new SplFixedArray(2);
+$fixed_array->setSize(array());
+var_dump($fixed_array);
+?>
+--EXPECTF--
+Warning: SplFixedArray::setSize() expects parameter 1 to be long, array given in %s on line %d
+object(SplFixedArray)#1 (2) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+}
diff --git a/ext/spl/tests/SplFixedArray_setSize_param_float.phpt b/ext/spl/tests/SplFixedArray_setSize_param_float.phpt
new file mode 100644
index 0000000000..c65686c61d
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setSize_param_float.phpt
@@ -0,0 +1,19 @@
+--TEST--
+SplFixedArray::setSize() with a float param
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+$fixed_array = new SplFixedArray(2);
+$fixed_array->setSize(3.14159);
+var_dump($fixed_array);
+?>
+--EXPECTF--
+object(SplFixedArray)#1 (3) {
+ [0]=>
+ NULL
+ [1]=>
+ NULL
+ [2]=>
+ NULL
+}
diff --git a/ext/spl/tests/SplFixedArray_setSize_param_null.phpt b/ext/spl/tests/SplFixedArray_setSize_param_null.phpt
new file mode 100644
index 0000000000..ddb37be9f0
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setSize_param_null.phpt
@@ -0,0 +1,13 @@
+--TEST--
+SplFixedArray::setSize() with a null parameter
+--CREDITS--
+PHPNW Testfest 2009 - Adrian Hardy
+--FILE--
+<?php
+$fixed_array = new SplFixedArray(2);
+$fixed_array->setSize(null);
+var_dump($fixed_array);
+?>
+--EXPECT--
+object(SplFixedArray)#1 (0) {
+}
diff --git a/ext/spl/tests/SplFixedArray_setSize_reduce.phpt b/ext/spl/tests/SplFixedArray_setSize_reduce.phpt
new file mode 100644
index 0000000000..eb8e1d9dcb
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setSize_reduce.phpt
@@ -0,0 +1,22 @@
+--TEST--
+SPL FixedArray can reduce size of array
+--CREDITS--
+PHPNW TestFest 2009 - Ben Longden
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$array[0] = 'a';
+$array[1] = 'b';
+$array[2] = 'c';
+$array[3] = 'd';
+$array[4] = 'e';
+$array->setSize(3);
+print_r($array);
+?>
+--EXPECT--
+SplFixedArray Object
+(
+ [0] => a
+ [1] => b
+ [2] => c
+)
diff --git a/ext/spl/tests/SplFixedArray_setsize_001.phpt b/ext/spl/tests/SplFixedArray_setsize_001.phpt
new file mode 100644
index 0000000000..925912ceba
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setsize_001.phpt
@@ -0,0 +1,22 @@
+--TEST--
+SPL: FixedArray: setsize - populate array, then shrink
+--CREDITS--
+PHPNW TestFest2009 - Rowan Merewood <rowan@merewood.org>
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$array[0] = 'one';
+$array[1] = 'two';
+$array[2] = 'three';
+$array[3] = 'four';
+$array[4] = 'five';
+$array->setSize(2);
+var_dump($array);
+?>
+--EXPECTF--
+object(SplFixedArray)#1 (2) {
+ [0]=>
+ %string|unicode%(3) "one"
+ [1]=>
+ %string|unicode%(3) "two"
+}
diff --git a/ext/spl/tests/SplFixedArray_setsize_grow.phpt b/ext/spl/tests/SplFixedArray_setsize_grow.phpt
new file mode 100644
index 0000000000..418d1ac37c
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setsize_grow.phpt
@@ -0,0 +1,30 @@
+--TEST--
+SplFixedArray::setSize() grow
+--CREDITS--
+PHPNW Test Fest 2009 - Jordan Hatch
+--FILE--
+<?php
+
+echo "\n";
+
+$array = new SplFixedArray(2);
+
+$array[0] = "Value 1";
+$array[1] = "Value 2";
+
+$array->setSize(4);
+
+$array[2] = "Value 3";
+$array[3] = "Value 4";
+
+print_r($array);
+
+?>
+--EXPECT--
+SplFixedArray Object
+(
+ [0] => Value 1
+ [1] => Value 2
+ [2] => Value 3
+ [3] => Value 4
+) \ No newline at end of file
diff --git a/ext/spl/tests/SplFixedArray_setsize_shrink.phpt b/ext/spl/tests/SplFixedArray_setsize_shrink.phpt
new file mode 100644
index 0000000000..2130cf8685
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_setsize_shrink.phpt
@@ -0,0 +1,28 @@
+--TEST--
+shrink a full array of integers
+--CREDITS--
+PHPNW Testfest 2009 - Lorna Mitchell
+--FILE--
+<?php
+$array = new SplFixedArray(5);
+$array[0] = 1;
+$array[1] = 1;
+$array[2] = 1;
+$array[3] = 1;
+$array[4] = 1;
+
+$array->setSize(4);
+var_dump($array);
+
+?>
+--EXPECT--
+object(SplFixedArray)#1 (4) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ [2]=>
+ int(1)
+ [3]=>
+ int(1)
+}
diff --git a/ext/spl/tests/SplFixedArray_toArray_with-params.phpt b/ext/spl/tests/SplFixedArray_toArray_with-params.phpt
new file mode 100644
index 0000000000..8864362c67
--- /dev/null
+++ b/ext/spl/tests/SplFixedArray_toArray_with-params.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Check that passing a parameter to toArray() produces a correct error
+--CREDITS--
+PHPNW Testfest 2009 - Paul Court ( g@rgoyle.com )
+--FILE--
+<?php
+ // Create a fixed array
+ $fixedArray = new SplFixedArray(5);
+
+ // Fill it up
+ for ($i=0; $i < 5; $i++) {
+ $fixedArray[$i] = "PHPNW Testfest";
+ }
+
+ // Test count() returns correct error when parameters are passed.
+ $fixedArray->count(1);
+?>
+--EXPECTF--
+Warning: SplFixedArray::count() expects exactly 0 parameters, %d given in %s on line %d
diff --git a/ext/spl/tests/SplFixedarray_offsetExists_larger.phpt b/ext/spl/tests/SplFixedarray_offsetExists_larger.phpt
new file mode 100644
index 0000000000..9449d64d8d
--- /dev/null
+++ b/ext/spl/tests/SplFixedarray_offsetExists_larger.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Checks that offsetExists() does not accept a value larger than the array.
+--CREDITS--
+ PHPNW Test Fest 2009 - Rick Ogden
+--FILE--
+<?php
+$ar = new SplFixedArray(3);
+$ar[0] = 1;
+$ar[1] = 2;
+$ar[2] = 3;
+
+var_dump($ar->offsetExists(4));
+?>
+--EXPECT--
+bool(false)
diff --git a/ext/spl/tests/SplHeap_count_invalid_parameter.phpt b/ext/spl/tests/SplHeap_count_invalid_parameter.phpt
new file mode 100644
index 0000000000..727790eabd
--- /dev/null
+++ b/ext/spl/tests/SplHeap_count_invalid_parameter.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Check that SplHeap::count generate a warning and returns NULL when param passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ new stdClass,
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $h = new SplMaxHeap();
+
+ var_dump($h->count($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::count() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplHeap_extract_invalid_parameter.phpt b/ext/spl/tests/SplHeap_extract_invalid_parameter.phpt
new file mode 100644
index 0000000000..ba03976396
--- /dev/null
+++ b/ext/spl/tests/SplHeap_extract_invalid_parameter.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Check that SplHeap::extract generate a warning and returns NULL when param passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ new stdClass,
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $h = new SplMaxHeap();
+
+ var_dump($h->extract($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplHeap_insert_invalid_parameter.phpt b/ext/spl/tests/SplHeap_insert_invalid_parameter.phpt
new file mode 100644
index 0000000000..86c6b6370e
--- /dev/null
+++ b/ext/spl/tests/SplHeap_insert_invalid_parameter.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Check that SplHeap::insert generate a warning and returns NULL when $value is missing
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$h = new SplMaxHeap();
+
+var_dump($h->insert());
+
+?>
+--EXPECTF--
+Warning: SplHeap::insert() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplHeap_isEmpty.phpt b/ext/spl/tests/SplHeap_isEmpty.phpt
new file mode 100644
index 0000000000..e179dbc8ec
--- /dev/null
+++ b/ext/spl/tests/SplHeap_isEmpty.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check that SplHeap::isEmpty standard success test
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$h = new SplMaxHeap();
+
+var_dump($h->isEmpty());
+
+?>
+--EXPECTF--
+bool(true)
+
diff --git a/ext/spl/tests/SplHeap_isEmpty_invalid_parameter.phpt b/ext/spl/tests/SplHeap_isEmpty_invalid_parameter.phpt
new file mode 100644
index 0000000000..021aff423f
--- /dev/null
+++ b/ext/spl/tests/SplHeap_isEmpty_invalid_parameter.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Check that SplHeap::isEmpty generate a warning and returns NULL when param passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ new stdClass,
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $h = new SplMaxHeap();
+
+ var_dump($h->isEmpty($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplHeap::isEmpty() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_addAll_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_addAll_invalid_parameter.phpt
new file mode 100644
index 0000000000..62605b1dcf
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_addAll_invalid_parameter.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Check that SplObjectStorage::addAll generate a warning and returns NULL when passed non-object param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+
+ var_dump($s->addAll($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, array given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, boolean given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, %unicode_string_optional% given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, integer given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, double given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, null given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_attach_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_attach_invalid_parameter.phpt
new file mode 100644
index 0000000000..d984429b09
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_attach_invalid_parameter.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Check that SplObjectStorage::attach generates a warning and returns NULL when bad params are passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+
+var_dump($s->attach(true));
+var_dump($s->attach(new stdClass, true, true));
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::attach() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::attach() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_contains_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_contains_invalid_parameter.phpt
new file mode 100644
index 0000000000..f523928702
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_contains_invalid_parameter.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Check that SplObjectStorage::contains generate a warning and returns NULL when passed non-object param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+
+ var_dump($s->contains($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::contains() expects parameter 1 to be object, array given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::contains() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::contains() expects parameter 1 to be object, %unicode_string_optional% given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::contains() expects parameter 1 to be object, integer given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::contains() expects parameter 1 to be object, double given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::contains() expects parameter 1 to be object, null given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_current_empty_storage.phpt b/ext/spl/tests/SplObjectStorage_current_empty_storage.phpt
new file mode 100644
index 0000000000..65fa69147a
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_current_empty_storage.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check that SplObjectStorage::current returns NULL when storage is empty
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+
+var_dump($s->current());
+
+?>
+--EXPECT--
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_detach_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_detach_invalid_parameter.phpt
new file mode 100644
index 0000000000..83b79fcbf2
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_detach_invalid_parameter.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Check that SplObjectStorage::detach generate a warning and returns NULL when passed non-object param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+
+ var_dump($s->detach($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::detach() expects parameter 1 to be object, array given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::detach() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::detach() expects parameter 1 to be object, %unicode_string_optional% given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::detach() expects parameter 1 to be object, integer given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::detach() expects parameter 1 to be object, double given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::detach() expects parameter 1 to be object, null given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_getInfo_empty_storage.phpt b/ext/spl/tests/SplObjectStorage_getInfo_empty_storage.phpt
new file mode 100644
index 0000000000..e6c4de88c1
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_getInfo_empty_storage.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check that SplObjectStorage::getInfo returns NULL when storage is empty
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+
+var_dump($s->getInfo());
+
+?>
+--EXPECT--
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_offsetGet.phpt b/ext/spl/tests/SplObjectStorage_offsetGet.phpt
new file mode 100644
index 0000000000..e73f6b1bd6
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_offsetGet.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Standard success for SplObjectStorage::offsetGet
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+$o1 = new stdClass();
+$s[$o1] = 'some_value';
+
+echo $s->offsetGet($o1);
+
+?>
+--EXPECT--
+some_value
+
diff --git a/ext/spl/tests/SplObjectStorage_offsetGet_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_offsetGet_invalid_parameter.phpt
new file mode 100644
index 0000000000..3f8bd437ec
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_offsetGet_invalid_parameter.phpt
@@ -0,0 +1,45 @@
+--TEST--
+Check that SplObjectStorage::offsetGet generate a warning and return NULL when passed non-object param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+ $o1 = new stdClass();
+ $s[$o1] = 'some_value';
+
+ var_dump($s->offsetGet($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::offsetGet() expects parameter 1 to be object, array given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::offsetGet() expects parameter 1 to be object, boolean given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::offsetGet() expects parameter 1 to be object, %unicode_string_optional% given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::offsetGet() expects parameter 1 to be object, integer given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::offsetGet() expects parameter 1 to be object, double given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::offsetGet() expects parameter 1 to be object, null given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_offsetGet_missing_object.phpt b/ext/spl/tests/SplObjectStorage_offsetGet_missing_object.phpt
new file mode 100644
index 0000000000..72b032c4ad
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_offsetGet_missing_object.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Check that SplObjectStorage::offsetGet throws exception when non-existing object is requested
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+$o1 = new stdClass();
+
+try {
+ $s->offsetGet($o1);
+} catch (UnexpectedValueException $e) {
+ echo $e->getMessage();
+}
+
+?>
+--EXPECT--
+Object not found
+
diff --git a/ext/spl/tests/SplObjectStorage_removeAll_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_removeAll_invalid_parameter.phpt
new file mode 100644
index 0000000000..ffd339869f
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_removeAll_invalid_parameter.phpt
@@ -0,0 +1,43 @@
+--TEST--
+Check that SplObjectStorage::removeAll generate a warning and returns NULL when passed non-object param
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+
+ var_dump($s->removeAll($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::removeAll() expects parameter 1 to be SplObjectStorage, array given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::removeAll() expects parameter 1 to be SplObjectStorage, boolean given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::removeAll() expects parameter 1 to be SplObjectStorage, %unicode_string_optional% given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::removeAll() expects parameter 1 to be SplObjectStorage, integer given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::removeAll() expects parameter 1 to be SplObjectStorage, double given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::removeAll() expects parameter 1 to be SplObjectStorage, null given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_setInfo_empty_storage.phpt b/ext/spl/tests/SplObjectStorage_setInfo_empty_storage.phpt
new file mode 100644
index 0000000000..c8c3cd1030
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_setInfo_empty_storage.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check that SplObjectStorage::setInfo returns NULL when storage is empty
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+
+var_dump($s->setInfo('some_value'));
+
+?>
+--EXPECT--
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_setInfo_invalid_parameter.phpt b/ext/spl/tests/SplObjectStorage_setInfo_invalid_parameter.phpt
new file mode 100644
index 0000000000..52f8f9b8e6
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_setInfo_invalid_parameter.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Check that SplObjectStorage::setInfo returns NULL when no param is passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+
+var_dump($s->setInfo());
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::setInfo() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter1.phpt b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter1.phpt
new file mode 100644
index 0000000000..dcf43e21f2
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter1.phpt
@@ -0,0 +1,27 @@
+--TEST--
+Check that SplObjectStorage::unserialize returns NULL when non-string param is passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ array(),
+ new stdClass(),
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+
+ var_dump($s->unserialize($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplObjectStorage::unserialize() expects parameter 1 to be %binary_string_optional%, array given in %s on line %d
+NULL
+
+Warning: SplObjectStorage::unserialize() expects parameter 1 to be %binary_string_optional%, object given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter2.phpt b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter2.phpt
new file mode 100644
index 0000000000..be2bb331b4
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter2.phpt
@@ -0,0 +1,34 @@
+--TEST--
+Check that SplObjectStorage::unserialize throws exception when numeric value passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ 12345,
+ 1.2345,
+ PHP_INT_MAX,
+ 'x:rubbish', // rubbish after the 'x:' prefix
+ 'x:i:2;O:8:"stdClass":0:{},s:5:"value";;m:a:0:{}',
+);
+
+foreach($data_provider as $input) {
+
+ $s = new SplObjectStorage();
+
+ try {
+ $s->unserialize($input);
+ } catch(UnexpectedValueException $e) {
+ echo $e->getMessage() . PHP_EOL;
+ }
+}
+
+?>
+--EXPECTF--
+Error at offset %d of %d bytes
+Error at offset %d of %d bytes
+Error at offset %d of %d bytes
+Error at offset %d of %d bytes
+Error at offset %d of %d bytes
+
diff --git a/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt
new file mode 100644
index 0000000000..4c2dd75e14
--- /dev/null
+++ b/ext/spl/tests/SplObjectStorage_unserialize_invalid_parameter3.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Check that SplObjectStorage::unserialize throws exception when NULL passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$s = new SplObjectStorage();
+
+try {
+ $s->unserialize(NULL);
+} catch(UnexpectedValueException $e) {
+ echo $e->getMessage();
+}
+
+?>
+--EXPECTF--
+Empty serialized string cannot be empty
+
diff --git a/ext/spl/tests/SplPriorityQueue_extract_invalid_parameter.phpt b/ext/spl/tests/SplPriorityQueue_extract_invalid_parameter.phpt
new file mode 100644
index 0000000000..7dda782b93
--- /dev/null
+++ b/ext/spl/tests/SplPriorityQueue_extract_invalid_parameter.phpt
@@ -0,0 +1,47 @@
+--TEST--
+Check that SplPriorityQueue::extract generate a warning and returns NULL when param passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$data_provider = array(
+ new stdClass,
+ array(),
+ true,
+ "string",
+ 12345,
+ 1.2345,
+ NULL
+);
+
+foreach($data_provider as $input) {
+
+ $h = new SplPriorityQueue();
+
+ var_dump($h->extract($input));
+}
+
+?>
+--EXPECTF--
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
+Warning: SplPriorityQueue::extract() expects exactly 0 parameters, 1 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplPriorityQueue_insert_invalid_parameter.phpt b/ext/spl/tests/SplPriorityQueue_insert_invalid_parameter.phpt
new file mode 100644
index 0000000000..7d7b589356
--- /dev/null
+++ b/ext/spl/tests/SplPriorityQueue_insert_invalid_parameter.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Check that SplPriorityQueue::insert generate a warning and returns NULL when rubbish params are passed
+--CREDITS--
+PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
+--FILE--
+<?php
+
+$h = new SplPriorityQueue();
+
+var_dump($h->insert(NULL));
+
+?>
+--EXPECTF--
+Warning: SplPriorityQueue::insert() expects exactly 2 parameters, 1 given in %s on line %d
+NULL
+
diff --git a/ext/spl/tests/SplQueue_setIteratorMode.phpt b/ext/spl/tests/SplQueue_setIteratorMode.phpt
new file mode 100644
index 0000000000..172a1d97a4
--- /dev/null
+++ b/ext/spl/tests/SplQueue_setIteratorMode.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check that SplQueue can't be set to LIFO
+--CREDITS--
+Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
+--FILE--
+<?php
+$queue = new SplQueue();
+try {
+ $queue->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECTF--
+Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen
diff --git a/ext/spl/tests/SplQueue_setIteratorMode_param_lifo.phpt b/ext/spl/tests/SplQueue_setIteratorMode_param_lifo.phpt
new file mode 100644
index 0000000000..c3071f2399
--- /dev/null
+++ b/ext/spl/tests/SplQueue_setIteratorMode_param_lifo.phpt
@@ -0,0 +1,19 @@
+--TEST--
+SplQueue setIteratorMode to LIFO produces fail condition in try/catch
+--CREDITS--
+PHPNW Test Fest 2009 - Jeremy Coates jeremy@phpnw.org.uk
+--FILE--
+<?php
+
+try {
+
+ $dll = new SplQueue();
+ $dll->setIteratorMode(SplDoublyLinkedList::IT_MODE_LIFO);
+
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+
+?>
+--EXPECT--
+Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen
diff --git a/ext/spl/tests/SplStack_setIteratorMode.phpt b/ext/spl/tests/SplStack_setIteratorMode.phpt
new file mode 100644
index 0000000000..d70105e034
--- /dev/null
+++ b/ext/spl/tests/SplStack_setIteratorMode.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Check that SplStack can't be set to FIFO
+--CREDITS--
+Rob Knight <themanhimself@robknight.org.uk> PHPNW Test Fest 2009
+--FILE--
+<?php
+$stack = new SplStack();
+try {
+ $stack->setIteratorMode(SplDoublyLinkedList::IT_MODE_FIFO);
+} catch (Exception $e) {
+ echo $e->getMessage();
+}
+?>
+--EXPECTF--
+Iterators' LIFO/FIFO modes for SplStack/SplQueue objects are frozen