1--TEST-- 2Check that SplObjectStorage::addAll generate a warning and returns NULL when passed non-object param 3--CREDITS-- 4PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com) 5--FILE-- 6<?php 7 8$data_provider = array( 9 array(), 10 true, 11 "string", 12 12345, 13 1.2345, 14 NULL 15); 16 17foreach($data_provider as $input) { 18 19 $s = new SplObjectStorage(); 20 21 var_dump($s->addAll($input)); 22} 23 24?> 25--EXPECTF-- 26Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, array given in %s on line %d 27NULL 28 29Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, boolean given in %s on line %d 30NULL 31 32Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, %unicode_string_optional% given in %s on line %d 33NULL 34 35Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, integer given in %s on line %d 36NULL 37 38Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, float given in %s on line %d 39NULL 40 41Warning: SplObjectStorage::addAll() expects parameter 1 to be SplObjectStorage, null given in %s on line %d 42NULL 43 44