[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] =?utf-8?q?svn:_/pecl/hidef/trunk/tests/_hidef=5F013.phpt?=
From:       Gopal_Vijayaraghavan <gopalv () php ! net>
Date:       2011-10-27 6:14:57
Message-ID: svn-gopalv-1319696097-318455-1244193503 () svn ! php ! net
[Download RAW message or body]

gopalv                                   Thu, 27 Oct 2011 06:14:57 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=318455

Log:
test isset() on FrozenArrays

Changed paths:
    A   pecl/hidef/trunk/tests/hidef_013.phpt

Added: pecl/hidef/trunk/tests/hidef_013.phpt
===================================================================
--- pecl/hidef/trunk/tests/hidef_013.phpt	                        (rev 0)
+++ pecl/hidef/trunk/tests/hidef_013.phpt	2011-10-27 06:14:57 UTC (rev 318455)
@@ -0,0 +1,38 @@
+--TEST--
+HIDEF: hidef isset() tests
+--SKIPIF--
+<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+--INI--
+hidef.data_path=./tests/
+--FILE--
+<?php
+$a = hidef_fetch("empties");
+
+for ($i = 0; $i < count($a); $i++)
+{
+	echo "isset(\$a[$i]) = ".(isset($a[$i]) ? "true" : "false")."\n";
+	/* note that $a[6] = FrozenArray, which does not match empty() */
+	echo "empty(\$a[$i]) = ".(empty($a[$i]) ? "true" : "false")."\n";
+}
+
+echo "isset(\$a[$i]) = ".(isset($a[$i]) ? "true" : "false")."\n";
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+isset($a[0]) = false
+empty($a[0]) = true
+isset($a[1]) = true
+empty($a[1]) = true
+isset($a[2]) = true
+empty($a[2]) = true
+isset($a[3]) = true
+empty($a[3]) = true
+isset($a[4]) = true
+empty($a[4]) = true
+isset($a[5]) = true
+empty($a[5]) = true
+isset($a[6]) = true
+empty($a[6]) = false
+isset($a[7]) = false
+===DONE===


Property changes on: pecl/hidef/trunk/tests/hidef_013.phpt
___________________________________________________________________
Added: svn:executable
   + *



-- 
PECL CVS Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic