Annotation of embedaddon/php/ext/spl/tests/SplDoublyLinkedList_offsetExists_success.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SPL SplDoublyLinkedList offsetExists returns correct values
                      3: --CREDITS--
                      4: PHPNW TestFest 2009 - Ben Longden
                      5: --FILE--
                      6: <?php
                      7: $list = new SplDoublyLinkedList();
                      8: 
                      9: // Push two values onto the list
                     10: $list->push('abc');
                     11: $list->push('def');
                     12: 
                     13: // Validate that we can see the first value
                     14: if($list->offsetExists(0) === true) {
                     15:        echo "PASS\n";
                     16: }
                     17: 
                     18: // Validate that we can see the second value
                     19: if($list->offsetExists(1) === true) {
                     20:        echo "PASS\n";
                     21: }
                     22: 
                     23: // Check that there is no third value
                     24: if($list->offsetExists(2) === false) {
                     25:        echo "PASS\n";
                     26: }
                     27: ?>
                     28: --EXPECTF--
                     29: PASS
                     30: PASS
                     31: PASS

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>