File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
spl /
tests /
SplDoublyLinkedList_offsetExists_success.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:01 2012 UTC (13 years, 4 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--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
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>