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

List:       pecl-cvs
Subject:    [PECL-CVS] =?utf-8?q?svn:_/pecl/dbase/branches/dbase-5.1/tests/_dbase=5Fget=5Frecord=5Fwith=5Fnames=
From:       Christoph_Michael_Becker <cmb () php ! net>
Date:       2016-10-28 18:12:16
Message-ID: svn-cmb-1477678336-340769-428897010 () svn ! php ! net
[Download RAW message or body]

cmb                                      Fri, 28 Oct 2016 18:12:16 +0000

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

Log:
Add test for dbase_get_record_with_names() and a 'deleted' field

Changed paths:
    A   pecl/dbase/branches/dbase-5.1/tests/dbase_get_record_with_names_variation1.phpt


Added: pecl/dbase/branches/dbase-5.1/tests/dbase_get_record_with_names_variation1.phpt
 ===================================================================
--- pecl/dbase/branches/dbase-5.1/tests/dbase_get_record_with_names_variation1.phpt	  \
                (rev 0)
+++ pecl/dbase/branches/dbase-5.1/tests/dbase_get_record_with_names_variation1.phpt	2016-10-28 \
18:12:16 UTC (rev 340769) @@ -0,0 +1,31 @@
+--TEST--
+dbase_get_record_with_names(): 'deleted' always contains deletion marker
+--DESCRIPTION--
+Even if the database has a field named 'deleted', dbase_get_record_with_names()
+will not return its value, but rather the deletion marker.
+--SKIPIF--
+<?php
+if (!extension_loaded('dbase')) die('skip dbase extension not available');
+?>
+--FILE--
+<?php
+$db = dbase_create(
+    __DIR__ . DIRECTORY_SEPARATOR . 'dbase_get_record_with_names_variation1.dbf',
+    array(
+        array('deleted', 'C', 15)
+    )
+);
+dbase_add_record($db, array('foo'));
+var_dump(dbase_get_record_with_names($db, 1));
+?>
+===DONE===
+--EXPECT--
+array(1) {
+  ["deleted"]=>
+  int(0)
+}
+===DONE===
+--CLEAN--
+<?php
+unlink(__DIR__ . DIRECTORY_SEPARATOR . \
'dbase_get_record_with_names_variation1.dbf'); +?>



-- 
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