[PHP-CVS] cvs: php-src /ext/standard/tests/array array_intersect_key_error.phpt array_intersect_key_variation1.phpt array_intersect_key_variation2.phpt array_intersect_key_variation3.phpt array_inters

2008-09-11 Thread Sanjay Mantoor
smantoorThu Sep 11 10:41:01 2008 UTC

  Added files: 
/php-src/ext/standard/tests/array   
array_intersect_key_variation2.phpt 
array_intersect_key_variation3.phpt 
array_intersect_key_error.phpt 
array_intersect_key_variation4.phpt 
array_intersect_key_variation5.phpt 
array_intersect_key_variation6.phpt 
array_intersect_key_variation7.phpt 
array_intersect_key_variation8.phpt 
array_intersect_key_variation1.phpt 
  Log:
  New testcases for array_intersect_key() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_key_variation2.phpt
+++ php-src/ext/standard/tests/array/array_intersect_key_variation2.phpt
--TEST--
Test array_intersect_key() function : usage variation - Passing unexpected 
values to second argument
--FILE--
 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
$array3 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);

//get an unset variable
$unset_var = 10;
unset ($unset_var);

//resource variable
$fp = fopen(__FILE__, "r");

// define some classes
class classWithToString
{
public function __toString() {
return "Class A object";
}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = << 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,

  // resource data
  'resource var' => $fp,
);

// loop through each element of the array for arr2
foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( array_intersect_key($array1, $value) );
  var_dump( array_intersect_key($array1, $value, $array3) );
}

fclose($fp);
?>
===DONE===
--EXPECTF--
*** Testing array_intersect_key() : usage variation ***

--int 0--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--int 1--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--int 12345--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--int -12345--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--float 10.5--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--float -10.5--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--float 12.3456789000e10--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--float -12.3456789000e10--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--float .5--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

--uppercase NULL--

Warning: array_intersect_key(): Argument #2 is not an array in %s on line %d
NULL

War

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_intersect_key_error.phpt array_intersect_key_variation1.phpt array_intersect_key_variation2.phpt array_intersect_key_variation3.phpt arr

2008-09-11 Thread Sanjay Mantoor
smantoorThu Sep 11 10:48:12 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   
array_intersect_key_variation8.phpt 
array_intersect_key_error.phpt 
array_intersect_key_variation1.phpt 
array_intersect_key_variation2.phpt 
array_intersect_key_variation3.phpt 
array_intersect_key_variation4.phpt 
array_intersect_key_variation5.phpt 
array_intersect_key_variation6.phpt 
array_intersect_key_variation7.phpt 
  Log:
  New testcases for array_intersect_key() function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_variation8.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_key_variation8.phpt
+++ php-src/ext/standard/tests/array/array_intersect_key_variation8.phpt
--TEST--
Test array_intersect_key() function : usage variation - Passing Multi 
dimensional array
--FILE--
 array('blue'  => 1, 'red'  => 2),
  
  'second' => array('yellow' => 7),
  
  'third' => array(0 =>'zero'),
);

$array2 = array (

  'first' => array('blue'  => 1, 'red'  => 2,),
  
  'second' => array('cyan'   => 8),
  
  'fourth' => array(2 => 'two'), 
);
var_dump( array_intersect_key($array1, $array2) );
var_dump( array_intersect_key($array2,$array1 ) ); 
?>
===DONE===
--EXPECTF--
*** Testing array_intersect_key() : usage variation ***
array(2) {
  [u"first"]=>
  array(2) {
[u"blue"]=>
int(1)
[u"red"]=>
int(2)
  }
  [u"second"]=>
  array(1) {
[u"yellow"]=>
int(7)
  }
}
array(2) {
  [u"first"]=>
  array(2) {
[u"blue"]=>
int(1)
[u"red"]=>
int(2)
  }
  [u"second"]=>
  array(1) {
[u"cyan"]=>
int(8)
  }
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_error.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_key_error.phpt
+++ php-src/ext/standard/tests/array/array_intersect_key_error.phpt
--TEST--
Test array_intersect_key() function : error conditions 
--FILE--
 1, 'red' => 2, 'green' => 3, 'purple' => 4);

// Testing array_intersect_key with one less than the expected number of 
arguments
echo "\n-- Testing array_intersect_key() function with less than expected no. 
of arguments --\n";
var_dump( array_intersect_key($array1) );

// Testing array_intersect_key with one less than the expected number of 
arguments
echo "\n-- Testing array_intersect_key() function with no arguments --\n";
var_dump( array_intersect_key() );
?>
===DONE===
--EXPECTF--
*** Testing array_intersect_key() : error conditions ***

-- Testing array_intersect_key() function with less than expected no. of 
arguments --

Warning: array_intersect_key(): at least 2 parameters are required, 1 given in 
%s on line %d
NULL

-- Testing array_intersect_key() function with no arguments --

Warning: array_intersect_key(): at least 2 parameters are required, 0 given in 
%s on line %d
NULL
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_key_variation1.phpt
+++ php-src/ext/standard/tests/array/array_intersect_key_variation1.phpt
--TEST--
Test array_intersect_key() function : usage variation - Passing unexpected 
values to first argument
--FILE--
 1, 'red' => 2, 'green' => 3, 'purple' => 4);
$array3 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8);

//get an unset variable
$unset_var = 10;
unset ($unset_var);

//resource variable
$fp = fopen(__FILE__, "r");

// define some classes
class classWithToString
{
public function __toString() {
return "Class A object";
}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = << 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_intersect_key_error.phpt

2008-09-11 Thread Sanjay Mantoor
smantoorThu Sep 11 11:21:53 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   array_intersect_key_error.phpt 
  Log:
  Fixed expected output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_key_error.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_intersect_key_error.phpt
diff -u php-src/ext/standard/tests/array/array_intersect_key_error.phpt:1.1.2.2 
php-src/ext/standard/tests/array/array_intersect_key_error.phpt:1.1.2.3
--- php-src/ext/standard/tests/array/array_intersect_key_error.phpt:1.1.2.2 
Thu Sep 11 10:48:12 2008
+++ php-src/ext/standard/tests/array/array_intersect_key_error.phpt Thu Sep 
11 11:21:53 2008
@@ -26,11 +26,11 @@
 
 -- Testing array_intersect_key() function with less than expected no. of 
arguments --
 
-Warning: Wrong parameter count for array_intersect_key() in %s on line %d
+Warning: array_intersect_key(): at least 2 parameters are required, 1 given in 
%s on line %d
 NULL
 
 -- Testing array_intersect_key() function with no arguments --
 
-Warning: Wrong parameter count for array_intersect_key() in %s on line %d
+Warning: array_intersect_key(): at least 2 parameters are required, 0 given in 
%s on line %d
 NULL
 ===DONE===



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_diff_uassoc_error.phpt array_diff_uassoc_variation1.phpt array_diff_uassoc_variation10.phpt array_diff_uassoc_variation11.phpt array_dif

2008-09-26 Thread Sanjay Mantoor
smantoorFri Sep 26 11:53:48 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   array_diff_uassoc_error.phpt 
array_diff_uassoc_variation1.phpt 
array_diff_uassoc_variation2.phpt 
array_diff_uassoc_variation3.phpt 
array_diff_uassoc_variation4.phpt 
array_diff_uassoc_variation5.phpt 
array_diff_uassoc_variation6.phpt 
array_diff_uassoc_variation7.phpt 
array_diff_uassoc_variation8.phpt 
array_diff_uassoc_variation9.phpt 
array_diff_uassoc_variation10.phpt 
array_diff_uassoc_variation11.phpt 
array_diff_uassoc_variation12.phpt 
array_diff_uassoc_variation13.phpt 
  Log:
  New testcases for array_diff_uassoc() function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_error.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_error.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_error.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation2.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation3.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation4.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation5.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation6.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation6.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation6.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation7.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation7.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation7.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation8.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation8.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation8.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation9.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation9.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation9.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation10.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation10.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation10.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation11.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation11.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation12.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation12.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation12.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation13.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation13.phpt
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation13.phpt



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



[PHP-CVS] cvs: php-src /ext/standard/tests/array array_diff_uassoc_error.phpt array_diff_uassoc_variation1.phpt array_diff_uassoc_variation10.phpt array_diff_uassoc_variation11.phpt array_diff_uassoc_

2008-09-26 Thread Sanjay Mantoor
smantoorFri Sep 26 11:57:41 2008 UTC

  Modified files:  
/php-src/ext/standard/tests/array   array_diff_uassoc_variation1.phpt 
array_diff_uassoc_variation2.phpt 
array_diff_uassoc_variation3.phpt 
array_diff_uassoc_variation4.phpt 
array_diff_uassoc_variation5.phpt 
array_diff_uassoc_variation6.phpt 
array_diff_uassoc_variation7.phpt 
array_diff_uassoc_variation8.phpt 
array_diff_uassoc_variation9.phpt 
array_diff_uassoc_error.phpt 
array_diff_uassoc_variation10.phpt 
array_diff_uassoc_variation11.phpt 
array_diff_uassoc_variation12.phpt 
array_diff_uassoc_variation13.phpt 
  Log:
  New testcases for array_diff_uassoc() function
  http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt
diff -u /dev/null 
php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt:1.2
--- /dev/null   Fri Sep 26 11:57:41 2008
+++ php-src/ext/standard/tests/array/array_diff_uassoc_variation1.phpt  Fri Sep 
26 11:57:41 2008
@@ -0,0 +1,244 @@
+--TEST--
+Test array_diff_uassoc() function : usage variation - Passing unexpected 
values to first argument
+--FILE--
+ "green", "yellow", "red");
+
+function key_compare_func($a, $b)
+{
+if ($a === $b) {
+return 0;
+}
+return ($a > $b)? 1:-1;
+}
+
+//get an unset variable
+$unset_var = 10;
+unset ($unset_var);
+
+//resource variable
+$fp = fopen(__FILE__, "r");
+
+// define some classes
+class classWithToString
+{
+   public function __toString() {
+   return "Class A object";
+   }
+}
+
+class classWithoutToString
+{
+}
+
+// heredoc string
+$heredoc = << 1, 'two' => 2);
+
+//array of values to iterate over
+$inputs = array(
+
+  // int data
+  'int 0' => 0,
+  'int 1' => 1,
+  'int 12345' => 12345,
+  'int -12345' => -2345,
+
+  // float data
+  'float 10.5' => 10.5,
+  'float -10.5' => -10.5,
+  'float 12.3456789000e10' => 12.3456789000e10,
+  'float -12.3456789000e10' => -12.3456789000e10,
+  'float .5' => .5,
+
+  // null data
+  'uppercase NULL' => NULL,
+  'lowercase null' => null,
+
+  // boolean data
+  'lowercase true' => true,
+  'lowercase false' =>false,
+  'uppercase TRUE' =>TRUE,
+  'uppercase FALSE' =>FALSE,
+
+  // empty data
+  'empty string DQ' => "",
+  'empty string SQ' => '',
+
+  // string data
+  'string DQ' => "string",
+  'string SQ' => 'string',
+  'mixed case string' => "sTrInG",
+  'heredoc' => $heredoc,
+
+  // object data
+  'instance of classWithToString' => new classWithToString(),
+  'instance of classWithoutToString' => new classWithoutToString(),
+
+  // undefined data
+  'undefined var' => @$undefined_var,
+
+  // unset data
+  'unset var' => @$unset_var,
+
+  // resource data
+  'resource' => $fp,
+);
+
+// loop through each element of the array for arr1
+
+foreach($inputs as $key =>$value) {
+  echo "\n--$key--\n";
+  var_dump( array_diff_uassoc($value, $array2, "key_compare_func") );
+};
+
+fclose($fp);
+?>
+===DONE===
+--EXPECTF--
+*** Testing array_diff_uassoc() : usage variation ***
+
+--int 0--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--int 1--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--int 12345--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--int -12345--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--float 10.5--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--float -10.5--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--float 12.3456789000e10--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--float -12.3456789000e10--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--float .5--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--uppercase NULL--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--lowercase null--
+
+Warning: array_diff_uassoc(): Argument #1 is not an array in %s on line %d
+NULL
+
+--lowercase true--
+
+Warning: array_diff_uassoc(): Argument

[PHP-CVS] cvs: php-src /ext/standard/tests/array array_diff_ukey_error.phpt array_diff_ukey_variation1.phpt array_diff_ukey_variation10.phpt array_diff_ukey_variation2.phpt array_diff_ukey_variation3.

2008-10-21 Thread Sanjay Mantoor
smantoorWed Oct 22 05:51:52 2008 UTC

  Added files: 
/php-src/ext/standard/tests/array   array_diff_ukey_variation7.phpt 
array_diff_ukey_variation10.phpt 
array_diff_ukey_variation8.phpt 
array_diff_ukey_variation9.phpt 
array_diff_ukey_error.phpt 
array_diff_ukey_variation1.phpt 
array_diff_ukey_variation2.phpt 
array_diff_ukey_variation3.phpt 
array_diff_ukey_variation4.phpt 
array_diff_ukey_variation5.phpt 
array_diff_ukey_variation6.phpt 
  Log:
  New PHP testcases for array_diff_ukey function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_ukey_variation7.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_ukey_variation7.phpt
+++ php-src/ext/standard/tests/array/array_diff_ukey_variation7.phpt
--TEST--
Test array_diff_ukey() function : usage variation - Passing float indexed array
--FILE--
 '0', 10 => '10', -10 => '-10', 20 =>'20'); 
$float_indx_array = array(0.0 => '0.0', 10.5 => '10.5', -30.5 => '-30.5'); 

function key_compare_func($key1, $key2)
{
  return strcasecmp($key1, $key2);
}

echo "\n-- Testing array_diff_ukey() function with float indexed array --\n";

var_dump( array_diff_ukey($float_indx_array, $input_array, 'key_compare_func') 
);
var_dump( array_diff_ukey($input_array, $float_indx_array, 'key_compare_func') 
);

?>
===DONE===
--EXPECTF--
*** Testing array_diff_ukey() : usage variation ***

-- Testing array_diff_ukey() function with float indexed array --
array(1) {
  [-30]=>
  unicode(5) "-30.5"
}
array(2) {
  [-10]=>
  unicode(3) "-10"
  [20]=>
  unicode(2) "20"
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_ukey_variation10.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_ukey_variation10.phpt
+++ php-src/ext/standard/tests/array/array_diff_ukey_variation10.phpt
--TEST--
Test array_diff_ukey() function : usage variation - Passing non-existing 
function name to callback
--FILE--
 "green", "b" => "brown", "c" => "blue", "red");
$array2 = array("a" => "green", "yellow", "red");

//function name within double quotes
var_dump( array_diff_ukey($array1, $array1, "unknown_function") );

//function name within single quotes
var_dump( array_diff_ukey($array1, $array1, 'unknown_function') );

//function name without quotes
var_dump( array_diff_ukey($array1, $array1, unknown_function) );

?>
===DONE===
--EXPECTF--
*** Testing array_diff_ukey() : usage variation ***

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 
'unknown_function' not found or invalid function name in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 
'unknown_function' not found or invalid function name in %s on line %d
NULL

Notice: Use of undefined constant unknown_function - assumed 'unknown_function' 
in %s on line %d

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, function 
'unknown_function' not found or invalid function name in %s on line %d
NULL
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_ukey_variation8.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_ukey_variation8.phpt
+++ php-src/ext/standard/tests/array/array_diff_ukey_variation8.phpt
--TEST--
Test array_diff_ukey() function : usage variation - Passing boolean indexed 
array
--FILE--
 '0', 1 => '1', -10 => '-10', 'true' => 1, 'false' => 
0); 
$boolean_indx_array = array(true => 'boolt', false => 'boolf', TRUE => 'boolT', 
FALSE => 'boolF');

function key_compare_func($key1, $key2)
{
  return strcasecmp($key1, $key2);
}

echo "\n-- Testing array_diff_ukey() function with boolean indexed array --\n";

var_dump( array_diff_ukey($boolean_indx_array, $input_array, 
'key_compare_func') );
var_dump( array_diff_ukey($input_array, $boolean_indx_array, 
'key_compare_func') );

?>
===DONE===
--EXPECTF--
*** Testing array_diff_ukey() : usage variation ***

-- Testing array_diff_ukey() function with boolean indexed array --
array(0) {
}
array(3) {
  [-10]=>
  unicode(3) "-10"
  [u"true"]=>
  int(1)
  [u"false"]=>
  int(0)
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_ukey_variation9.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_ukey_variation9.phpt
+++ php-src/ext/standard/tests/array/array_diff_ukey_variation9.phpt
--TEST--
Test array_diff_ukey() function : usage variation - Passing null,unset and 
undefined variable indexed array
--FILE--
 '10', "" => 'empty'); 

//get an unset va

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_diff_ukey_error.phpt array_diff_ukey_variation1.phpt array_diff_ukey_variation10.phpt array_diff_ukey_variation2.phpt array_diff_ukey_va

2008-10-21 Thread Sanjay Mantoor
smantoorWed Oct 22 05:53:36 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   array_diff_ukey_variation4.phpt 
array_diff_ukey_variation5.phpt 
array_diff_ukey_variation6.phpt 
array_diff_ukey_variation7.phpt 
array_diff_ukey_error.phpt 
array_diff_ukey_variation8.phpt 
array_diff_ukey_variation9.phpt 
array_diff_ukey_variation10.phpt 
array_diff_ukey_variation1.phpt 
array_diff_ukey_variation2.phpt 
array_diff_ukey_variation3.phpt 
  Log:
  New PHP testcases for array_diff_ukey function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_diff_ukey_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_diff_ukey_variation4.phpt
+++ php-src/ext/standard/tests/array/array_diff_ukey_variation4.phpt
--TEST--
Test array_diff_ukey() function : usage variation - Passing unexpected values 
to callback argument
--FILE--
 5, 'blue' => 6, 'yellow' => 7, 'cyan'   => 8);
$array2 = array('blue'  => 1, 'red'  => 2, 'green'  => 3, 'purple' => 4);
$array3 = array(1, 2, 3, 4, 5);

//get an unset variable
$unset_var = 10;
unset ($unset_var);

//resource variable
$fp = fopen(__FILE__, "r");

// define some classes
class classWithToString
{
public function __toString() {
return "Class A object";
}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = << 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,

  // resource data
  'resource' => $fp,
);

// loop through each element of the array for ...

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( array_diff_ukey($array1, $array2, $value) );
  var_dump( array_diff_ukey($array1, $array2, $array3, $value) );
};

fclose($fp);
?>
===DONE===
--EXPECTF--
*** Testing array_diff_ukey() : usage variation ***

--int 0--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--int 1--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--int 12345--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--int -12345--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--float 10.5--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--float -10.5--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--float 12.3456789000e10--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array 
or string given in %s on line %d
NULL

--float -12.3456789000e10--

Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array 
or string given in %s on line %d
NULL

Warning: array_diff_ukey() expects paramete

[PHP-CVS] cvs: php-src /ext/standard/tests/array array_intersect_uassoc_error.phpt array_intersect_uassoc_variation1.phpt array_intersect_uassoc_variation10.phpt array_intersect_uassoc_variation2.phpt

2008-10-28 Thread Sanjay Mantoor
smantoorTue Oct 28 10:21:13 2008 UTC

  Added files: 
/php-src/ext/standard/tests/array   
array_intersect_uassoc_variation10.phpt 
array_intersect_uassoc_variation1.phpt 
array_intersect_uassoc_variation2.phpt 
array_intersect_uassoc_variation3.phpt 
array_intersect_uassoc_variation4.phpt 
array_intersect_uassoc_variation5.phpt 
array_intersect_uassoc_error.phpt 
array_intersect_uassoc_variation6.phpt 
array_intersect_uassoc_variation7.phpt 
array_intersect_uassoc_variation8.phpt 
array_intersect_uassoc_variation9.phpt 
  Log:
  New testcases for array_intersect_uassoc function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt
+++ php-src/ext/standard/tests/array/array_intersect_uassoc_variation10.phpt
--TEST--
Test array_intersect_uassoc() function : usage variation - Passing class/object 
methods to callback
--FILE--
 "green", "c" => "blue", "red");
$array2 = array("a" => "green", "yellow", "red");
// define some class with method
class MyClass
{
static function static_compare_func($a, $b) {
return strcasecmp($a, $b);
}

public function class_compare_func($a, $b) {
return strcasecmp($a, $b);
}

}

echo "\n-- Testing array_intersect_uassoc() function using class with static 
method as callback --\n";
var_dump( array_intersect_uassoc($array1, $array2, 
array('MyClass','static_compare_func')) );
var_dump( array_intersect_uassoc($array1, $array2, 
'MyClass::static_compare_func'));

echo "\n-- Testing array_intersect_uassoc() function using class with regular 
method as callback --\n";
$obj = new MyClass();
var_dump( array_intersect_uassoc($array1, $array2, 
array($obj,'class_compare_func')) );
?>
===DONE===
--EXPECTF--
*** Testing array_intersect_uassoc() : usage variation ***

-- Testing array_intersect_uassoc() function using class with static method as 
callback --
array(1) {
  [u"a"]=>
  unicode(5) "green"
}
array(1) {
  [u"a"]=>
  unicode(5) "green"
}

-- Testing array_intersect_uassoc() function using class with regular method as 
callback --
array(1) {
  [u"a"]=>
  unicode(5) "green"
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
+++ php-src/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
--TEST--
Test array_intersect_uassoc() function : usage variation - Passing unexpected 
values to first argument
--FILE--
 "green", "yellow", "red");
$array3 = array("a"=>"green", "brown");

//Callback function
function key_compare_func($a, $b) {
if ($a === $b) {
return 0;
}
return ($a > $b) ? 1 : -1;
}

//get an unset variable
$unset_var = 10;
unset ($unset_var);

//resource variable
$fp = fopen(__FILE__, "r");

// define some classes
class classWithToString
{
public function __toString() {
return "Class A object";
}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = << 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,

  // resource data
  'resource' => $fp,
);

// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( array_inte

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard/tests/array array_intersect_uassoc_error.phpt array_intersect_uassoc_variation1.phpt array_intersect_uassoc_variation10.phpt array_intersect_uassoc_variat

2008-10-28 Thread Sanjay Mantoor
smantoorTue Oct 28 10:24:41 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/standard/tests/array   
array_intersect_uassoc_variation1.phpt 
array_intersect_uassoc_variation2.phpt 
array_intersect_uassoc_variation3.phpt 
array_intersect_uassoc_variation4.phpt 
array_intersect_uassoc_variation5.phpt 
array_intersect_uassoc_variation10.phpt 
array_intersect_uassoc_variation6.phpt 
array_intersect_uassoc_variation7.phpt 
array_intersect_uassoc_variation8.phpt 
array_intersect_uassoc_variation9.phpt 
array_intersect_uassoc_error.phpt 
  Log:
  New testcases for array_intersect_uassoc function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
+++ php-src/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt
--TEST--
Test array_intersect_uassoc() function : usage variation - Passing unexpected 
values to first argument
--FILE--
 "green", "yellow", "red");
$array3 = array("a"=>"green", "brown");

//Callback function
function key_compare_func($a, $b) {
if ($a === $b) {
return 0;
}
return ($a > $b) ? 1 : -1;
}

//get an unset variable
$unset_var = 10;
unset ($unset_var);

//resource variable
$fp = fopen(__FILE__, "r");

// define some classes
class classWithToString
{
public function __toString() {
return "Class A object";
}
}

class classWithoutToString
{
}

// heredoc string
$heredoc = << 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,

  // resource data
  'resource' => $fp,
);

// loop through each element of the array for arr1
foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( array_intersect_uassoc($value, $array2, 'key_compare_func') );
  var_dump( array_intersect_uassoc($value, $array2, $array3, 
'key_compare_func') );
};

fclose($fp);
?>
===DONE===
--EXPECTF--

*** Testing array_intersect_uassoc() : usage variation ***

--int 0--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--int 1--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--int 12345--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--int -12345--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--float 10.5--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--float -10.5--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--float 12.3456789000e10--

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

Warning: array_intersect_uassoc(): Argument #1 is not an array in %s on line %d
NULL

--float -12.3456789000e10--

Warning: array_intersect_uassoc(): Argument #1 is not an array i

[PHP-CVS] cvs: php-src /ext/date/tests gettimeofday_basic.phpt gettimeofday_error.phpt gettimeofday_variation1.phpt

2008-10-30 Thread Sanjay Mantoor
smantoorThu Oct 30 10:46:18 2008 UTC

  Added files: 
/php-src/ext/date/tests gettimeofday_variation1.phpt 
gettimeofday_basic.phpt 
gettimeofday_error.phpt 
  Log:
  New testcases for gettimeofday function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_variation1.phpt
+++ php-src/ext/date/tests/gettimeofday_variation1.phpt
--TEST--
Test gettimeofday() function : usage variation - Passing unexpected values to 
get_as_float argument
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for get_as_float

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gettimeofday($value) );
};

?>
===DONE===
--EXPECTF--
*** Testing gettimeofday() : usage variation ***

--int 0--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--int 1--
float(%f)

--int 12345--
float(%f)

--int -12345--
float(%f)

--float 10.5--
float(%f)

--float -10.5--
float(%f)

--float 12.3456789000e10--
float(%f)

--float -12.3456789000e10--
float(%f)

--float .5--
float(%f)

--empty array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--int indexed array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--associative array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--nested arrays--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--uppercase NULL--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--lowercase null--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--lowercase true--
float(%f)

--lowercase false--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--uppercase TRUE--
float(%f)

--uppercase FALSE--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--empty string DQ--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--empty string SQ--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--string DQ--
float(%f)

--string SQ--
float(%f)

--mixed case string--
float(%f)

--heredoc--
float(%f)

--instance of classWithToString--

Warning: gettimeofday() expects parameter 1 to be boolean, object given in %s 
on line %d
NULL

--instance of classWithoutToString--

Warning: gettimeofday() expects parameter 1 to be boolean, object given in %s 
on line %d
NULL

--undefined var--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--unset var--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_basic.phpt
+++ php-src/ext/date/tests/gettimeofday_basic.phpt
--TEST--
Test gettimeofday() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing gettimeofday() : basic functionality ***
float(%f)
array(4) {
  [u"se

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests gettimeofday_basic.phpt gettimeofday_error.phpt gettimeofday_variation1.phpt

2008-10-30 Thread Sanjay Mantoor
smantoorThu Oct 30 10:49:45 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests gettimeofday_error.phpt 
gettimeofday_basic.phpt 
gettimeofday_variation1.phpt 
  Log:
  New testcases for gettimeofday function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_error.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_error.phpt
+++ php-src/ext/date/tests/gettimeofday_error.phpt
--TEST--
Test gettimeofday() function : error conditions 
--FILE--

===DONE===
--EXPECTF--
*** Testing gettimeofday() : error conditions ***

-- Testing gettimeofday() function with more than expected no. of arguments --

Warning: gettimeofday() expects at most 1 parameter, 2 given in %s on line %d
NULL
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_basic.phpt
+++ php-src/ext/date/tests/gettimeofday_basic.phpt
--TEST--
Test gettimeofday() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing gettimeofday() : basic functionality ***
float(%f)
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_variation1.phpt
+++ php-src/ext/date/tests/gettimeofday_variation1.phpt
--TEST--
Test gettimeofday() function : usage variation - Passing unexpected values to 
get_as_float argument
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for get_as_float

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gettimeofday($value) );
};

?>
===DONE===
--EXPECTF--
*** Testing gettimeofday() : usage variation ***

--int 0--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--int 1--
float(%f)

--int 12345--
float(%f)

--int -12345--
float(%f)

--float 10.5--
float(%f)

--float -10.5--
float(%f)

--float 12.3456789000e10--
float(%f)

--float -12.3456789000e10--
float(%f)

--float .5--
float(%f)

--empty array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--int indexed array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--associative array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--nested arrays--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--uppercase NULL--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--lowercase null--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--lowercase true--
float(%f)

--lowercase false--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--uppercase TRUE--
float(%f)

--uppercase FALSE--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--empty string DQ--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--empty string SQ--
array(

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests date_sunrise_error.phpt date_sunrise_variation1.phpt date_sunrise_variation2.phpt date_sunrise_variation3.phpt date_sunrise_variation4.phpt date_sunrise

2008-11-09 Thread Sanjay Mantoor
smantoorMon Nov 10 05:52:20 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests date_sunrise_variation5.phpt 
date_sunrise_variation6.phpt 
date_sunrise_variation7.phpt 
date_sunrise_variation8.phpt 
date_sunrise_variation9.phpt 
date_sunrise_error.phpt 
date_sunrise_variation1.phpt 
date_sunrise_variation2.phpt 
date_sunrise_variation3.phpt 
date_sunrise_variation4.phpt 
  Log:
  New testcases for date_sunrise function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunrise_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunrise_variation5.phpt
+++ php-src/ext/date/tests/date_sunrise_variation5.phpt
--TEST--
Test date_sunrise() function : usage variation - Passing unexpected values to 
fifth argument zenith
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for zenith

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $longitude, 
$value, $gmt_offset) );
  var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $longitude, 
$value, $gmt_offset) );
  var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, 
$longitude, $value, $gmt_offset) );
};

?>
===DONE===
--EXPECTF--
*** Testing date_sunrise() : usage variation ***

--int 0--
bool(false)
bool(false)
bool(false)

--int 1--
bool(false)
bool(false)
bool(false)

--int 12345--
unicode(5) "09:52"
float(9.882%d)
int(1218169377)

--int -12345--
unicode(5) "09:54"
float(9.909%d)
int(1218169475)

--empty array--

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

--associative array--

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

--nested arrays--

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, array given in %s on 
line %d
bool(false)

--uppercase NULL--
bool(false)
bool(false)
bool(false)

--lowercase null--
bool(false)
bool(false)
bool(false)

--lowercase true--
bool(false)
bool(false)
bool(false)

--lowercase false--
bool(false)
bool(false)
bool(false)

--uppercase TRUE--
bool(false)
bool(false)
bool(false)

--uppercase FALSE--
bool(false)
bool(false)
bool(false)

--empty string DQ--

Warning: date_sunrise() expects parameter 5 to be double, Unicode string given 
in %s on line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, Unicode string given 
in %s on line %d
bool(false)

Warning: date_sunrise() expects parameter 5 to be double, Unicode string given 
in %s on line %d
bool(false)

--empty string SQ--


[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests date_sunset_error.phpt date_sunset_variation1.phpt date_sunset_variation2.phpt date_sunset_variation3.phpt date_sunset_variation4.phpt date_sunset_varia

2008-11-09 Thread Sanjay Mantoor
smantoorMon Nov 10 07:12:00 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests date_sunset_variation4.phpt 
date_sunset_variation5.phpt 
date_sunset_variation6.phpt 
date_sunset_variation7.phpt 
date_sunset_error.phpt 
date_sunset_variation8.phpt 
date_sunset_variation9.phpt 
date_sunset_variation1.phpt 
date_sunset_variation2.phpt 
date_sunset_variation3.phpt 
  Log:
  New testcases for date_sunset function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunset_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunset_variation4.phpt
+++ php-src/ext/date/tests/date_sunset_variation4.phpt
--TEST--
Test date_sunset() function : usage variation - Passing unexpected values to 
fourth argument longitude.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -2345,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for longitude

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $latitude, $value, 
$zenith, $gmt_offset) );
  var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, $latitude, $value, 
$zenith, $gmt_offset) );
  var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $value, 
$zenith, $gmt_offset) );
};

?>
===DONE===
--EXPECTF--
*** Testing date_sunset() : usage variation ***

--int 0--
unicode(5) "00:03"
float(0.059%d)
int(1218220414)

--int 1--
unicode(5) "23:59"
float(23.992%d)
int(1218220174)

--int 12345--
unicode(5) "17:15"
float(17.259%d)
int(1218195932)

--int -12345--
unicode(5) "12:18"
float(12.316%d)
int(1218178138)

--empty array--

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--associative array--

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--nested arrays--

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--uppercase NULL--
unicode(5) "00:03"
float(0.059%d)
int(1218220414)

--lowercase null--
unicode(5) "00:03"
float(0.059%d)
int(1218220414)

--lowercase true--
unicode(5) "23:59"
float(23.992%d)
int(1218220174)

--lowercase false--
unicode(5) "00:03"
float(0.059%d)
int(1218220414)

--uppercase TRUE--
unicode(5) "23:59"
float(23.992%d)
int(1218220174)

--uppercase FALSE--
unicode(5) "00:03"
float(0.059%d)
int(1218220414)

--empty string DQ--

Warning: date_sunset() expects parameter 4 to be double, Unicode string given 
in %s on line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be double, Unicode string given 
in %s on line %d
bool(false)

Warning: date_sunset() expects parameter 4 to be 

[PHP-CVS] cvs: php-src /ext/date/tests date_sunset_error.phpt date_sunset_variation1.phpt date_sunset_variation2.phpt date_sunset_variation3.phpt date_sunset_variation4.phpt date_sunset_variation5.php

2008-11-09 Thread Sanjay Mantoor
smantoorMon Nov 10 07:10:00 2008 UTC

  Added files: 
/php-src/ext/date/tests date_sunset_variation7.phpt 
date_sunset_variation8.phpt 
date_sunset_variation9.phpt 
date_sunset_error.phpt 
date_sunset_variation1.phpt 
date_sunset_variation2.phpt 
date_sunset_variation3.phpt 
date_sunset_variation4.phpt 
date_sunset_variation5.phpt 
date_sunset_variation6.phpt 
  Log:
  New testcases for date_sunset function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunset_variation7.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunset_variation7.phpt
+++ php-src/ext/date/tests/date_sunset_variation7.phpt
--TEST--
Test date_sunset() function : usage variation -  Checking sunrise for 
consecutive days in specific timezone
--FILE--
 array ("Latitude" => -14.24, "Longitude" => 
-170.72, "GMT" => -11),
"US/Alaska" => array ("Latitude" => 61, "Longitude" => -150 , 
"GMT" => -9),
"America/Chicago" => array ("Latitude" => 41.85, "Longitude" => 
-87.65 , "GMT" => -5),
"America/Montevideo" => array ("Latitude" => -34.88, 
"Longitude" => -56.18 , "GMT" => -3),
"Africa/Casablanca" => array ("Latitude" => 33.65, "Longitude" 
=> "-7.58", "GMT" => 0),
"Europe/Moscow" => array ("Latitude" => 55.75, "Longitude" => 
37.58, "GMT" => 4),
"Asia/Hong_Kong" => array ("Latitude" => 22.28, "Longitude" => 
114.15 , "GMT" => 8),
"Australia/Brisbane" => array ("Latitude" => -27.46, 
"Longitude" => 153.2 , "GMT" => 10),
"Pacific/Wallis" => array ("Latitude" => -13.3, "Longitude" => 
-176.16, "GMT" => 12),
);

foreach($inputs as $timezone => $value) {
 echo "\n--$timezone--\n";
 date_default_timezone_set($timezone);
 $time = mktime(8, 8, 8, 8, 11, 2008);
 var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $value["Latitude"], 
$value["Longitude"], 90, $value["GMT"] ));
 $time = mktime(8, 8, 8, 8, 12, 2008); 
 var_dump( date_sunset($time, SUNFUNCS_RET_STRING, $value["Latitude"], 
$value["Longitude"], 90, $value["GMT"]) );
}
?>
===DONE===
--EXPECTF--
*** Testing date_sunset() : usage variation ***

--Pacific/Samoa--
unicode(5) "18:13"
unicode(5) "18:13"

--US/Alaska--
unicode(5) "21:00"
unicode(5) "20:57"

--America/Chicago--
unicode(5) "19:51"
unicode(5) "19:50"

--America/Montevideo--
unicode(5) "18:08"
unicode(5) "18:09"

--Africa/Casablanca--
unicode(5) "19:17"
unicode(5) "19:16"

--Europe/Moscow--
unicode(5) "21:09"
unicode(5) "21:07"

--Asia/Hong_Kong--
unicode(5) "18:55"
unicode(5) "18:54"

--Australia/Brisbane--
unicode(5) "17:21"
unicode(5) "17:21"

--Pacific/Wallis--
unicode(5) "17:36"
unicode(5) "17:36"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunset_variation8.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunset_variation8.phpt
+++ php-src/ext/date/tests/date_sunset_variation8.phpt
--TEST--
Test date_sunset() function : usage variation -  Checking with North and South 
poles when Sun is up and down all day
--FILE--
 mktime(8, 8, 8, 8, 12, 2008),
"13 Aug 2008" => mktime(8, 8, 8, 8, 13, 2008),

//Date at which Sun is up all day at South Pole
"12 Nov 2008" => mktime(8, 8, 8, 11, 12, 2008),
"13 Nov 2008" => mktime(8, 8, 8, 11, 13, 2008),
);

//Iterate over different date and time
foreach( $time_date as $date => $time ){
echo "\n--$date--\n";
var_dump( date_sunset($time, SUNFUNCS_RET_STRING, 90, 0 ) );
var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, 90, 0 ) );
var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, 90, 0 ) ); 
var_dump( date_sunset($time, SUNFUNCS_RET_STRING, -90, 0 ) );
var_dump( date_sunset($time, SUNFUNCS_RET_DOUBLE, -90, 0 ) );
var_dump( date_sunset($time, SUNFUNCS_RET_TIMESTAMP, -90, 0 ) );

}

?>
===DONE===
--EXPECTF--
*** Testing date_sunset() : usage variation ***

--12 Aug 2008--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)

--13 Aug 2008--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)

--12 Nov 2008--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)

--13 Nov 2008--
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunset_variation9.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunset_variation9.phpt
+++ php-src/ext/date/tests/date_sunset_variation9.phpt
--TEST--
Test date_sunset() function : usage variation - Passing high positive and

[PHP-CVS] cvs: php-src /ext/date/tests date_sunrise_error.phpt date_sunrise_variation1.phpt date_sunrise_variation2.phpt date_sunrise_variation3.phpt date_sunrise_variation4.phpt date_sunrise_variatio

2008-11-09 Thread Sanjay Mantoor
smantoorMon Nov 10 05:49:55 2008 UTC

  Added files: 
/php-src/ext/date/tests date_sunrise_variation2.phpt 
date_sunrise_variation3.phpt 
date_sunrise_error.phpt 
date_sunrise_variation4.phpt 
date_sunrise_variation5.phpt 
date_sunrise_variation6.phpt 
date_sunrise_variation7.phpt 
date_sunrise_variation8.phpt 
date_sunrise_variation9.phpt 
date_sunrise_variation1.phpt 
  Log:
  New testcases for date_sunrise function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunrise_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunrise_variation2.phpt
+++ php-src/ext/date/tests/date_sunrise_variation2.phpt
--TEST--
Test date_sunrise() function : usage variation - Passing unexpected values to 
second argument format.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for format

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( date_sunrise($time, $value, $latitude, $longitude, $zenith, 
$gmt_offset) );
};

?>
===DONE===
--EXPECTF--
*** Testing date_sunrise() : usage variation ***

--float 10.5--

Warning: date_sunrise(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float -10.5--

Warning: date_sunrise(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float 12.3456789000e10--

Warning: date_sunrise(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float -12.3456789000e10--

Warning: date_sunrise(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float .5--
int(1218174483)

--empty array--

Warning: date_sunrise() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: date_sunrise() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--associative array--

Warning: date_sunrise() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--nested arrays--

Warning: date_sunrise() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--uppercase NULL--
int(1218174483)

--lowercase null--
int(1218174483)

--lowercase true--
unicode(5) "06:48"

--lowercase false--
int(1218174483)

--uppercase TRUE--
unicode(5) "06:48"

--uppercase FALSE--
int(1218174483)

--empty string DQ--

Warning: date_sunrise() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--empty string SQ--

Warning: date_sunrise() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--string DQ--

Warning: date_sunrise() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--string SQ--

Warning: date_sunrise() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--mixed case string--

Warning: date_sunrise() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--heredoc--

Warning: date_sunrise() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--instance of classWithToString--

Warning: date_sunrise() expects parameter 2 to be long, object given in %s on 
line %d
bool(false)

--instance o

[PHP-CVS] cvs: php-src /ext/date/tests gmdate_basic.phpt gmdate_error.phpt gmdate_variation1.phpt gmdate_variation10.phpt gmdate_variation11.phpt gmdate_variation12.phpt gmdate_variation13.phpt gmdate

2008-11-14 Thread Sanjay Mantoor
smantoorFri Nov 14 09:14:30 2008 UTC

  Added files: 
/php-src/ext/date/tests gmdate_variation2.phpt 
gmdate_variation3.phpt 
gmdate_variation4.phpt 
gmdate_variation5.phpt 
gmdate_variation6.phpt 
gmdate_variation7.phpt 
gmdate_variation8.phpt 
gmdate_variation9.phpt gmdate_error.phpt 
gmdate_basic.phpt gmdate_variation10.phpt 
gmdate_variation11.phpt 
gmdate_variation12.phpt 
gmdate_variation13.phpt 
gmdate_variation1.phpt 
gmdate_variation14.phpt 
  Log:
  New testcases for gmdate function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation2.phpt
+++ php-src/ext/date/tests/gmdate_variation2.phpt
--TEST--
Test gmdate() function : usage variation - Passing unexpected values to 
timestamp argument.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gmdate($format, $value) );
};

?>
===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

--int 0--
unicode(24) "1970-01-01T00:00:00+"

--int 1--
unicode(24) "1970-01-01T00:00:01+"

--int 12345--
unicode(24) "1970-01-01T03:25:45+"

--int -12345--
unicode(24) "1969-12-31T20:34:15+"

--float 10.5--
unicode(24) "1970-01-01T00:00:10+"

--float -10.5--
unicode(24) "1969-12-31T23:59:50+"

--float .5--
unicode(24) "1970-01-01T00:00:00+"

--empty array--

Warning: gmdate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--int indexed array--

Warning: gmdate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--associative array--

Warning: gmdate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--nested arrays--

Warning: gmdate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--uppercase NULL--
unicode(24) "1970-01-01T00:00:00+"

--lowercase null--
unicode(24) "1970-01-01T00:00:00+"

--lowercase true--
unicode(24) "1970-01-01T00:00:01+"

--lowercase false--
unicode(24) "1970-01-01T00:00:00+"

--uppercase TRUE--
unicode(24) "1970-01-01T00:00:01+"

--uppercase FALSE--
unicode(24) "1970-01-01T00:00:00+"

--empty string DQ--

Warning: gmdate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--empty string SQ--

Warning: gmdate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--string DQ--

Warning: gmdate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--string SQ--

Warning: gmdate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--mixed case string--

Warning: gmdate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--heredoc--

Warning: gmdate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--instance of classWithToString--

Warning: gmdate() expects parameter 2 to be long, object given in %s on line %d
bool(false)

--instance of classWithoutToString--

Warning: gmdate() expects parameter 2 to be long, object given in %s on line %d
bool(false)

--undefined var--
unicode(24) "1970-01-01T00:00:00+"

--unset var--
unicode(24) "

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests gmdate_basic.phpt gmdate_error.phpt gmdate_variation1.phpt gmdate_variation10.phpt gmdate_variation11.phpt gmdate_variation12.phpt gmdate_variation13.ph

2008-11-14 Thread Sanjay Mantoor
smantoorFri Nov 14 09:16:01 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests gmdate_error.phpt gmdate_basic.phpt 
gmdate_variation1.phpt 
gmdate_variation2.phpt 
gmdate_variation10.phpt 
gmdate_variation3.phpt 
gmdate_variation11.phpt 
gmdate_variation4.phpt 
gmdate_variation12.phpt 
gmdate_variation5.phpt 
gmdate_variation13.phpt 
gmdate_variation6.phpt 
gmdate_variation7.phpt 
gmdate_variation14.phpt 
gmdate_variation8.phpt 
gmdate_variation9.phpt 
  Log:
  New testcases for gmdate function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_error.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_error.phpt
+++ php-src/ext/date/tests/gmdate_error.phpt
--TEST--
Test gmdate() function : error conditions 
--FILE--

===DONE===
--EXPECTF--
*** Testing gmdate() : error conditions ***

-- Testing gmdate() function with Zero arguments --

Warning: gmdate() expects at least 1 parameter, 0 given in %s on line %d
bool(false)

-- Testing gmdate() function with more than expected no. of arguments --

Warning: gmdate() expects at most 2 parameters, 3 given in %s on line %d
bool(false)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_basic.phpt
+++ php-src/ext/date/tests/gmdate_basic.phpt
--TEST--
Test gmdate() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing gmdate() : basic functionality ***
unicode(24) "2008-08-08T08:08:08+"
unicode(%d) "%s"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation1.phpt
+++ php-src/ext/date/tests/gmdate_variation1.phpt
--TEST--
Test gmdate() function : usage variation - Passing unexpected values to format 
argument .
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for format

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gmdate($value, $timestamp) );
  var_dump( gmdate($value) );
};

?>
===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

--int 0--
unicode(1) "0"
unicode(1) "0"

--int 1--
unicode(1) "1"
unicode(1) "1"

--int 12345--
unicode(5) "12345"
unicode(5) "12345"

--int -12345--
unicode(6) "-12345"
unicode(6) "-12345"

--float 10.5--
unicode(4) "10.5"
unicode(4) "10.5"

--float -10.5--
unicode(5) "-10.5"
unicode(5) "-10.5"

--float 12.3456789000e10--
unicode(12) "123456789000"
unicode(12) "123456789000"

--float -12.3456789000e10--
unicode(13) "-123456789000"
unicode(13) "-123456789000"

--float .5--
unicode(3) "0.5"
unicode(3) "0.5"

--empty array--

Warning: gmdate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

Warning: gmdate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: gmdate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

Warning: gmdate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

--associative array--

Warning: gmdate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

Warning: gmdate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

--nested

[PHP-CVS] cvs: php-src /ext/date/tests gmmktime_basic.phpt gmmktime_error.phpt gmmktime_variation1.phpt gmmktime_variation2.phpt gmmktime_variation3.phpt gmmktime_variation4.phpt gmmktime_variation5.p

2008-11-20 Thread Sanjay Mantoor
smantoorFri Nov 21 06:21:51 2008 UTC

  Added files: 
/php-src/ext/date/tests gmmktime_variation1.phpt 
gmmktime_variation2.phpt 
gmmktime_variation3.phpt 
gmmktime_basic.phpt 
gmmktime_variation4.phpt 
gmmktime_variation5.phpt 
gmmktime_variation6.phpt 
gmmktime_variation7.phpt 
gmmktime_variation8.phpt 
gmmktime_variation9.phpt 
gmmktime_error.phpt 
  Log:
  New testcases for gmmktime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmmktime_variation1.phpt
+++ php-src/ext/date/tests/gmmktime_variation1.phpt
--TEST--
Test gmmktime() function : usage variation - Passing unexpected values to first 
argument hour.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for hour

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gmmktime($value, $min, $sec, $mon, $day, $year) );
};

?>
===DONE===
--EXPECTF--
*** Testing gmmktime() : usage variation ***

--float 10.5--
int(1218190088)

--float -10.5--
int(1218118088)

--float .5--
int(1218154088)

--empty array--

Warning: gmmktime() expects parameter 1 to be long, array given in %s on line %d
bool(false)

--int indexed array--

Warning: gmmktime() expects parameter 1 to be long, array given in %s on line %d
bool(false)

--associative array--

Warning: gmmktime() expects parameter 1 to be long, array given in %s on line %d
bool(false)

--nested arrays--

Warning: gmmktime() expects parameter 1 to be long, array given in %s on line %d
bool(false)

--uppercase NULL--
int(1218154088)

--lowercase null--
int(1218154088)

--lowercase true--
int(1218157688)

--lowercase false--
int(1218154088)

--uppercase TRUE--
int(1218157688)

--uppercase FALSE--
int(1218154088)

--empty string DQ--

Warning: gmmktime() expects parameter 1 to be long, Unicode string given in %s 
on line %d
bool(false)

--empty string SQ--

Warning: gmmktime() expects parameter 1 to be long, Unicode string given in %s 
on line %d
bool(false)

--string DQ--

Warning: gmmktime() expects parameter 1 to be long, Unicode string given in %s 
on line %d
bool(false)

--string SQ--

Warning: gmmktime() expects parameter 1 to be long, Unicode string given in %s 
on line %d
bool(false)

--mixed case string--

Warning: gmmktime() expects parameter 1 to be long, Unicode string given in %s 
on line %d
bool(false)

--heredoc--

Warning: gmmktime() expects parameter 1 to be long, Unicode string given in %s 
on line %d
bool(false)

--instance of classWithToString--

Warning: gmmktime() expects parameter 1 to be long, object given in %s on line 
%d
bool(false)

--instance of classWithoutToString--

Warning: gmmktime() expects parameter 1 to be long, object given in %s on line 
%d
bool(false)

--undefined var--
int(1218154088)

--unset var--
int(1218154088)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmmktime_variation2.phpt
+++ php-src/ext/date/tests/gmmktime_variation2.phpt
--TEST--
Test gmmktime() function : usage variation - Passing unexpected values to 
second argument minute.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_ar

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests gmmktime_basic.phpt gmmktime_error.phpt gmmktime_variation1.phpt gmmktime_variation2.phpt gmmktime_variation3.phpt gmmktime_variation4.phpt gmmktime_var

2008-11-20 Thread Sanjay Mantoor
smantoorFri Nov 21 06:22:58 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests gmmktime_variation2.phpt 
gmmktime_variation3.phpt 
gmmktime_error.phpt 
gmmktime_variation4.phpt 
gmmktime_variation5.phpt 
gmmktime_variation6.phpt 
gmmktime_variation7.phpt 
gmmktime_variation8.phpt 
gmmktime_variation9.phpt 
gmmktime_basic.phpt 
gmmktime_variation1.phpt 
  Log:
  New testcases for gmmktime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmmktime_variation2.phpt
+++ php-src/ext/date/tests/gmmktime_variation2.phpt
--TEST--
Test gmmktime() function : usage variation - Passing unexpected values to 
second argument minute.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for min

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gmmktime($hour, $value, $sec, $mon, $day, $year) );
};

?>
===DONE===
--EXPECTF--
*** Testing gmmktime() : usage variation ***

--float 10.5--
int(1218183008)

--float -10.5--
int(1218181808)

--float .5--
int(1218182408)

--empty array--

Warning: gmmktime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--int indexed array--

Warning: gmmktime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--associative array--

Warning: gmmktime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--nested arrays--

Warning: gmmktime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--uppercase NULL--
int(1218182408)

--lowercase null--
int(1218182408)

--lowercase true--
int(1218182468)

--lowercase false--
int(1218182408)

--uppercase TRUE--
int(1218182468)

--uppercase FALSE--
int(1218182408)

--empty string DQ--

Warning: gmmktime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--empty string SQ--

Warning: gmmktime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--string DQ--

Warning: gmmktime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--string SQ--

Warning: gmmktime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--mixed case string--

Warning: gmmktime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--heredoc--

Warning: gmmktime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--instance of classWithToString--

Warning: gmmktime() expects parameter 2 to be long, object given in %s on line 
%d
bool(false)

--instance of classWithoutToString--

Warning: gmmktime() expects parameter 2 to be long, object given in %s on line 
%d
bool(false)

--undefined var--
int(1218182408)

--unset var--
int(1218182408)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmmktime_variation3.phpt
+++ php-src/ext/date/tests/gmmktime_variation3.phpt
--TEST--
Test gmmktime() function : usage variation - Passing unexpected values to third 
argument seconds.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => ar

[PHP-CVS] cvs: php-src /ext/date/tests gmmktime_variation9.phpt

2008-11-24 Thread Sanjay Mantoor
smantoorMon Nov 24 11:05:02 2008 UTC

  Modified files:  
/php-src/ext/date/tests gmmktime_variation9.phpt 
  Log:
  Fixed testcsae inputs so that test runs faster
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation9.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/gmmktime_variation9.phpt
diff -u php-src/ext/date/tests/gmmktime_variation9.phpt:1.1 
php-src/ext/date/tests/gmmktime_variation9.phpt:1.2
--- php-src/ext/date/tests/gmmktime_variation9.phpt:1.1 Fri Nov 21 06:21:51 2008
+++ php-src/ext/date/tests/gmmktime_variation9.phpt Mon Nov 24 11:05:02 2008
@@ -1,5 +1,5 @@
 --TEST--
-Test gmmktime() function : usage variation - Passing positive and negetive 
float values to arguments.
+Test gmmktime() function : usage variation - Passing positive and negative 
float values to arguments.
 --FILE--
  12.3456789000e10,
-  'float -12.3456789000e10' => -12.3456789000e10,
+ 'float 123456' => 123456,
+  'float -123456' => -123456,
   'float -10.5' => -10.5,
 );
 
@@ -39,19 +39,19 @@
 --EXPECTREGEX--
 \*\*\* Testing gmmktime\(\) : usage variation \*\*\*
 
---float 12.3456789000e10--
-(bool|int)\((false|45658554088)\)
-(bool|int)\((false|7408625522408)\)
-(bool|int)\((false|124674971880)\)
-(bool|int)\((false|324659998242749288)\)
-(bool|int)\((false|3906586568967811688)\)
-
---float -12.3456789000e10--
-(bool|int)\((false|-4345912)\)
-(bool|int)\((false|-7406189157592)\)
-int\((-929300768|-122238606120)\)
-(bool|int)\((false|-324659995848460312)\)
-(bool|int)\((false|-3906586693265644312)\)
+--float 123456--
+int\(1662595688\)
+int\(1225589768\)
+int\(1218306336\)
+(bool|int)\((false|325855037288)\)
+(bool|int)\((false|3844412784488)\)
+
+--float -123456--
+int\(773712488\)
+int\(1210775048\)
+int\(1218059424\)
+(bool|int)\((false|-323460834712)\)
+(bool|int)\((false|-3968710530712)\)
 
 --float -10.5--
 int\(1218118088\)



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests gmmktime_variation9.phpt

2008-11-24 Thread Sanjay Mantoor
smantoorMon Nov 24 11:10:03 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/date/tests gmmktime_variation9.phpt 
  Log:
  Fixed testcsae inputs so that test runs faster
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation9.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
Index: php-src/ext/date/tests/gmmktime_variation9.phpt
diff -u php-src/ext/date/tests/gmmktime_variation9.phpt:1.1.2.2 
php-src/ext/date/tests/gmmktime_variation9.phpt:1.1.2.3
--- php-src/ext/date/tests/gmmktime_variation9.phpt:1.1.2.2 Fri Nov 21 
06:22:58 2008
+++ php-src/ext/date/tests/gmmktime_variation9.phpt Mon Nov 24 11:10:02 2008
@@ -1,5 +1,5 @@
 --TEST--
-Test gmmktime() function : usage variation - Passing positive and negetive 
float values to arguments.
+Test gmmktime() function : usage variation - Passing positive and negative 
float values to arguments.
 --FILE--
  12.3456789000e10,
-  'float -12.3456789000e10' => -12.3456789000e10,
+ 'float 123456' => 123456,
+  'float -123456' => -123456,
   'float -10.5' => -10.5,
 );
 
@@ -39,19 +39,19 @@
 --EXPECTREGEX--
 \*\*\* Testing gmmktime\(\) : usage variation \*\*\*
 
---float 12.3456789000e10--
-(bool|int)\((false|45658554088)\)
-(bool|int)\((false|7408625522408)\)
-(bool|int)\((false|124674971880)\)
-(bool|int)\((false|324659998242749288)\)
-(bool|int)\((false|3906586568967811688)\)
-
---float -12.3456789000e10--
-(bool|int)\((false|-4345912)\)
-(bool|int)\((false|-7406189157592)\)
-int\((-929300768|-122238606120)\)
-(bool|int)\((false|-324659995848460312)\)
-(bool|int)\((false|-3906586693265644312)\)
+--float 123456--
+int\(1662595688\)
+int\(1225589768\)
+int\(1218306336\)
+(bool|int)\((false|325855037288)\)
+(bool|int)\((false|3844412784488)\)
+
+--float -123456--
+int\(773712488\)
+int\(1210775048\)
+int\(1218059424\)
+(bool|int)\((false|-323460834712)\)
+(bool|int)\((false|-3968710530712)\)
 
 --float -10.5--
 int\(1218118088\)



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



Re: [PHP-CVS] cvs: php-src /ext/date/tests gmmktime_basic.phpt gmmktime_error.phpt gmmktime_variation1.phpt gmmktime_variation2.phpt gmmktime_variation3.phpt gmmktime_variation4.phpt gmmktime_variatio

2008-11-25 Thread Sanjay Mantoor
Antony,

I have changed the test case and committed.
Can you please check and let me know if any problems.

Thanks,
Sanjay Mantoor

On Mon, Nov 24, 2008 at 1:55 PM, Antony Dovgal <[EMAIL PROTECTED]> wrote:
> On 24.11.2008 09:15, Sanjay M Mantoor wrote:
>> Antony,
>>
>> Yes. It takes some time in passing on linux 64 bit. But I am seeing tests
>> are passing consistently here.
>> Here is sample run on linux64 bit. Please let me know if any problems.
>
> Could you change this test, so that it doesn't take 3 minutes to pass, please?
> I believe it would make 30 minutes under valgrind, which is unreasonably long 
> for a test.
>
> --
> Wbr,
> Antony Dovgal
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Thanks,
Sanjay Mantoor

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests date_sunrise_error.phpt date_sunrise_variation1.phpt date_sunrise_variation2.phpt date_sunrise_variation3.phpt date_sunrise_variation4.phpt date_sunrise

2008-12-04 Thread Sanjay Mantoor
smantoorFri Dec  5 05:35:39 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests date_sunrise_variation4.phpt 
date_sunrise_variation5.phpt 
date_sunrise_variation6.phpt 
date_sunrise_variation7.phpt 
date_sunrise_error.phpt 
date_sunrise_variation8.phpt 
date_sunrise_variation9.phpt 
date_sunrise_variation1.phpt 
date_sunrise_variation2.phpt 
date_sunrise_variation3.phpt 
  Log:
  New testcases for date_sunrise function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunrise_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunrise_variation4.phpt
+++ php-src/ext/date/tests/date_sunrise_variation4.phpt
--TEST--
Test date_sunrise() function : usage variation - Passing unexpected values to 
fourth argument longitude.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for longitude

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( date_sunrise($time, SUNFUNCS_RET_STRING, $latitude, $value, 
$zenith, $gmt_offset) );
  var_dump( date_sunrise($time, SUNFUNCS_RET_DOUBLE, $latitude, $value, 
$zenith, $gmt_offset) );
  var_dump( date_sunrise($time, SUNFUNCS_RET_TIMESTAMP, $latitude, $value, 
$zenith, $gmt_offset) );
};

?>
===DONE===
--EXPECTF--
*** Testing date_sunrise() : usage variation ***

--int 0--
unicode(5) "05:12"
float(5.200%d)
int(1218172321)

--int 1--
unicode(5) "05:08"
float(5.133%d)
int(1218172081)

--int 12345--
unicode(5) "21:45"
float(21.759%d)
int(1218145534)

--int -12345--
unicode(5) "12:41"
float(12.698%d)
int(1218199315)

--empty array--

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--associative array--

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--nested arrays--

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, array given in %s on 
line %d
bool(false)

--uppercase NULL--
unicode(5) "05:12"
float(5.200%d)
int(1218172321)

--lowercase null--
unicode(5) "05:12"
float(5.200%d)
int(1218172321)

--lowercase true--
unicode(5) "05:08"
float(5.133%d)
int(1218172081)

--lowercase false--
unicode(5) "05:12"
float(5.200%d)
int(1218172321)

--uppercase TRUE--
unicode(5) "05:08"
float(5.133%d)
int(1218172081)

--uppercase FALSE--
unicode(5) "05:12"
float(5.200%d)
int(1218172321)

--empty string DQ--

Warning: date_sunrise() expects parameter 4 to be double, Unicode string given 
in %s on line %d
bool(false)

Warning: date_sunrise() expects parameter 4 to be double, Unicode string given 
in %s on line %d
bool(false)

Warning: date_sunr

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests date_sunset_error.phpt date_sunset_variation1.phpt date_sunset_variation2.phpt date_sunset_variation3.phpt date_sunset_variation4.phpt date_sunset_varia

2008-12-04 Thread Sanjay Mantoor
smantoorFri Dec  5 06:12:11 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests date_sunset_variation2.phpt 
date_sunset_variation3.phpt 
date_sunset_error.phpt 
date_sunset_variation4.phpt 
date_sunset_variation5.phpt 
date_sunset_variation6.phpt 
date_sunset_variation7.phpt 
date_sunset_variation8.phpt 
date_sunset_variation9.phpt 
date_sunset_variation1.phpt 
  Log:
  New testcases for date_sunset function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/date_sunset_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/date_sunset_variation2.phpt
+++ php-src/ext/date/tests/date_sunset_variation2.phpt
--TEST--
Test date_sunset() function : usage variation - Passing unexpected values to 
second argument format.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for format

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( date_sunset($time, $value, $latitude, $longitude, $zenith, 
$gmt_offset) );
};

?>
===DONE===
--EXPECTF--
*** Testing date_sunset() : usage variation ***

--float 10.5--

Warning: date_sunset(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float -10.5--

Warning: date_sunset(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float 12.3456789000e10--

Warning: date_sunset(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float -12.3456789000e10--

Warning: date_sunset(): Wrong return format given, pick one of 
SUNFUNCS_RET_TIMESTAMP, SUNFUNCS_RET_STRING or SUNFUNCS_RET_DOUBLE in %s on 
line %d
bool(false)

--float .5--
int(1218199253)

--empty array--

Warning: date_sunset() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: date_sunset() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--associative array--

Warning: date_sunset() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--nested arrays--

Warning: date_sunset() expects parameter 2 to be long, array given in %s on 
line %d
bool(false)

--uppercase NULL--
int(1218199253)

--lowercase null--
int(1218199253)

--lowercase true--
unicode(5) "18:10"

--lowercase false--
int(1218199253)

--uppercase TRUE--
unicode(5) "18:10"

--uppercase FALSE--
int(1218199253)

--empty string DQ--

Warning: date_sunset() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--empty string SQ--

Warning: date_sunset() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--string DQ--

Warning: date_sunset() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--string SQ--

Warning: date_sunset() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--mixed case string--

Warning: date_sunset() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--heredoc--

Warning: date_sunset() expects parameter 2 to be long, Unicode string given in 
%s on line %d
bool(false)

--instance of classWithToString--

Warning: date_sunset() expects parameter 2 to be long, object given in %s on 
line %d
bool(false)

--instance of classWithoutT

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests idate_basic.phpt idate_variation1.phpt idate_variation2.phpt idate_variation3.phpt idate_variation4.phpt idate_variation5.phpt idate_variation6.phpt

2008-12-08 Thread Sanjay Mantoor
smantoorMon Dec  8 10:48:22 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests idate_variation4.phpt idate_variation5.phpt 
idate_variation6.phpt idate_basic.phpt 
idate_variation1.phpt idate_variation2.phpt 
idate_variation3.phpt 
  Log:
  New testcases for idate function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation4.phpt
+++ php-src/ext/date/tests/idate_variation4.phpt
--TEST--
Test idate() function : usage variation - Passing supported Date format 
characters to format argument.
--FILE--
 'd',
  'Leap Year' =>'L',
  'Month number' => 'm',
  'Days in the month' => 't',
  'Day of the week' => 'w',
  'ISO-8601 week number' => 'W',
  'Year (1 or 2 digits)' => 'y',
  'Year 4 digits' => 'Y',
  'Day of the year' => 'z',
);

// loop through each element of the array for timestamp
foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( idate($value) );
};
?>
===DONE===
--EXPECTF--
*** Testing idate() : usage variation ***

--Day of the month--
int(%d)

--Leap Year--
int(%d)

--Month number--
int(%d)

--Days in the month--
int(%d)

--Day of the week--
int(%d)

--ISO-8601 week number--
int(%d)

--Year (1 or 2 digits)--
int(%d)

--Year 4 digits--
int(%d)

--Day of the year--
int(%d)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation5.phpt
+++ php-src/ext/date/tests/idate_variation5.phpt
--TEST--
Test idate() function : usage variation - Passing supported Time format 
characters to format argument.
--FILE--
 'B',
  '12 hour format' => 'h',
  '24 hour format' => 'H',
  'Minutes' => 'i',
  'DST Activated' => 'I',
  'Seconds' => 's',
  'Seconds since Unix Epoch' => 'U',
  'Time zone offset' => 'Z'
);

// loop through each element of the array for timestamp
foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( idate($value) );
};
?>
===DONE===
--EXPECTF--
*** Testing idate() : usage variation ***

--Internet Time--
int(%d)

--12 hour format--
int(%d)

--24 hour format--
int(%d)

--Minutes--
int(%d)

--DST Activated--
int(%d)

--Seconds--
int(%d)

--Seconds since Unix Epoch--
int(%d)

--Time zone offset--
int(%d)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation6.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation6.phpt
+++ php-src/ext/date/tests/idate_variation6.phpt
--TEST--
Test idate() function : usage variation - Checking return of year(1 or 2 
digits) format starting with zero and nonzero.
--FILE--

===DONE===
--EXPECTF--
*** Testing idate() : usage variation ***

-- Testing idate() function for 2 digit year having no zero as starting number 
--
int(70)

-- Testing idate() function for 2 digit year having zero as starting number --
int(1)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_basic.phpt
+++ php-src/ext/date/tests/idate_basic.phpt
--TEST--
Test idate() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing idate() : basic functionality ***
int(%d)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation1.phpt
+++ php-src/ext/date/tests/idate_variation1.phpt
--TEST--
Test idate() function : usage variation - Passing unexpected values to first 
argument 'format'. 
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$uns

[PHP-CVS] cvs: php-src /ext/date/tests idate_basic.phpt idate_variation1.phpt idate_variation2.phpt idate_variation3.phpt idate_variation4.phpt idate_variation5.phpt idate_variation6.phpt idate_variat

2008-12-08 Thread Sanjay Mantoor
smantoorMon Dec  8 10:41:47 2008 UTC

  Added files: 
/php-src/ext/date/tests idate_variation7.phpt idate_variation1.phpt 
idate_variation2.phpt idate_variation3.phpt 
idate_basic.phpt idate_variation4.phpt 
idate_variation5.phpt idate_variation6.phpt 
  Log:
  New testcases for idate function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation7.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation7.phpt
+++ php-src/ext/date/tests/idate_variation7.phpt
--TEST--
Test idate() function : usage variation - Checking for Strict Standards.
--FILE--

===DONE===
--EXPECTF--
*** Testing idate() : usage variation ***

Strict Standards: idate(): It is not safe to rely on the system's timezone 
settings.%s
int(2008)

Strict Standards: idate(): It is not safe to rely on the system's timezone 
settings.%s
int(2008)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation1.phpt
+++ php-src/ext/date/tests/idate_variation1.phpt
--TEST--
Test idate() function : usage variation - Passing unexpected values to first 
argument 'format'. 
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for format

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( idate($value) );
  var_dump( idate($value, $timestamp) );
};

?>
===DONE===
--EXPECTF--
*** Testing idate() : usage variation ***

--int 0--

Warning: idate(): Unrecognized date format token in %s on line %d
bool(false)

Warning: idate(): Unrecognized date format token in %s on line %d
bool(false)

--int 1--

Warning: idate(): Unrecognized date format token in %s on line %d
bool(false)

Warning: idate(): Unrecognized date format token in %s on line %d
bool(false)

--int 12345--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--int -12345--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--float 10.5--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--float -10.5--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--float 12.3456789000e10--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--float -12.3456789000e10--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--float .5--

Warning: idate(): idate format is one char in %s on line %d
bool(false)

Warning: idate(): idate format is one char in %s on line %d
bool(false)

--empty array--

Warning: idate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

Warning: idate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

--int indexed array--

Warning: idate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

Warning: idate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

--associative array--

Warning: idate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

Warning: idate() expects parameter 1 to be binary string, array given in %s on 
line %d
bool(false)

--nested arrays--

Warning: idate() expects paramete

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests gettimeofday_basic.phpt gettimeofday_error.phpt gettimeofday_variation1.phpt

2008-12-15 Thread Sanjay Mantoor
smantoorMon Dec 15 08:23:58 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests gettimeofday_error.phpt 
gettimeofday_basic.phpt 
gettimeofday_variation1.phpt 
  Log:
  New testcases for gettimeofday function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_error.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_error.phpt
+++ php-src/ext/date/tests/gettimeofday_error.phpt
--TEST--
Test gettimeofday() function : error conditions 
--FILE--

===DONE===
--EXPECTF--
*** Testing gettimeofday() : error conditions ***

-- Testing gettimeofday() function with more than expected no. of arguments --

Warning: gettimeofday() expects at most 1 parameter, 2 given in %s on line %d
NULL
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_basic.phpt
+++ php-src/ext/date/tests/gettimeofday_basic.phpt
--TEST--
Test gettimeofday() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing gettimeofday() : basic functionality ***
float(%f)
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gettimeofday_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gettimeofday_variation1.phpt
+++ php-src/ext/date/tests/gettimeofday_variation1.phpt
--TEST--
Test gettimeofday() function : usage variation - Passing unexpected values to 
get_as_float argument
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // int data
  'int 0' => 0,
  'int 1' => 1,
  'int 12345' => 12345,
  'int -12345' => -12345,

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float 12.3456789000e10' => 12.3456789000e10,
  'float -12.3456789000e10' => -12.3456789000e10,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for get_as_float

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gettimeofday($value) );
};

?>
===DONE===
--EXPECTF--
*** Testing gettimeofday() : usage variation ***

--int 0--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--int 1--
float(%f)

--int 12345--
float(%f)

--int -12345--
float(%f)

--float 10.5--
float(%f)

--float -10.5--
float(%f)

--float 12.3456789000e10--
float(%f)

--float -12.3456789000e10--
float(%f)

--float .5--
float(%f)

--empty array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--int indexed array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--associative array--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--nested arrays--

Warning: gettimeofday() expects parameter 1 to be boolean, array given in %s on 
line %d
NULL

--uppercase NULL--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--lowercase null--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--lowercase true--
float(%f)

--lowercase false--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--uppercase TRUE--
float(%f)

--uppercase FALSE--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--empty string DQ--
array(4) {
  [u"sec"]=>
  int(%d)
  [u"usec"]=>
  int(%d)
  [u"minuteswest"]=>
  int(-330)
  [u"dsttime"]=>
  int(0)
}

--empty string SQ--
array(

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests gmdate_basic.phpt gmdate_error.phpt gmdate_variation1.phpt gmdate_variation10.phpt gmdate_variation11.phpt gmdate_variation12.phpt gmdate_variation13.ph

2008-12-15 Thread Sanjay Mantoor
smantoorMon Dec 15 10:36:54 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests gmdate_variation7.phpt 
gmdate_variation10.phpt 
gmdate_variation8.phpt 
gmdate_variation11.phpt 
gmdate_variation9.phpt 
gmdate_variation12.phpt 
gmdate_variation13.phpt 
gmdate_variation14.phpt gmdate_error.phpt 
gmdate_variation1.phpt 
gmdate_variation2.phpt gmdate_basic.phpt 
gmdate_variation3.phpt 
gmdate_variation4.phpt 
gmdate_variation5.phpt 
gmdate_variation6.phpt 
  Log:
  New testcases for gmdate function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation7.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation7.phpt
+++ php-src/ext/date/tests/gmdate_variation7.phpt
--TEST--
Test gmdate() function : usage variation - Passing Year format options to 
format argument.
--FILE--

===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

-- Testing gmdate() function with checking non leap year using Leap Year format 
--
unicode(1) "0"

-- Testing gmdate() function with checking leap year using Leap Year format --
unicode(1) "%d"
unicode(1) "1"

-- Testing gmdate() function with ISO-8601 year number format --
unicode(4) "%d"
unicode(4) "2008"

-- Testing gmdate() function with full numeric representation of year format --
unicode(4) "%d"
unicode(4) "2008"

-- Testing gmdate() function with 2 digit representation year format --
unicode(2) "%d"
unicode(2) "08"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation10.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation10.phpt
+++ php-src/ext/date/tests/gmdate_variation10.phpt
--TEST--
Test gmdate() function : usage variation - Passing Timezone format options to 
format argument.
--FILE--

===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

-- Testing gmdate() function with Timezone identifier format --
unicode(3) "UTC"
unicode(3) "UTC"

-- Testing gmdate() function with checking whether date is in daylight saving 
time format --
unicode(1) "%d"
unicode(1) "%d"

-- Testing gmdate() function with difference to GMT in hours format --
unicode(5) "+"
unicode(5) "+"

-- Testing gmdate() function with Difference to GMT in hours using colon as 
separator format --
unicode(6) "+00:00"
unicode(6) "+00:00"

-- Testing gmdate() function with timezone abbreviation format --
unicode(3) "GMT"
unicode(3) "GMT"

-- Testing gmdate() function with timezone offset format --
unicode(3) "GMT"
unicode(3) "GMT"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation8.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation8.phpt
+++ php-src/ext/date/tests/gmdate_variation8.phpt
--TEST--
Test gmdate() function : usage variation - Passing Year format options to 
format argument.
--FILE--

===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

-- Testing gmdate() function with checking non leap year using Leap Year format 
--
unicode(1) "0"

-- Testing gmdate() function with checking leap year using Leap Year format --
unicode(1) "%d"
unicode(1) "1"

-- Testing gmdate() function with ISO-8601 year number format --
unicode(4) "%d"
unicode(4) "2008"

-- Testing gmdate() function with full numeric representation of year format --
unicode(4) "%d"
unicode(4) "2008"

-- Testing gmdate() function with 2 digit representation year format --
unicode(2) "%d"
unicode(2) "08"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation11.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation11.phpt
+++ php-src/ext/date/tests/gmdate_variation11.phpt
--TEST--
Test gmdate() function : usage variation - Passing Full Date/Time format 
options to format argument.
--FILE--

===DONE===
--EXPECTF--
*** Testing gmdate() : usage variation ***

-- Testing gmdate() function with ISO 8601 date format --
unicode(%d) "%s"
unicode(25) "2008-08-08T08:08:08+00:00"

-- Testing gmdate() function with RFC 2822 date format --
unicode(%d) "%s"
unicode(31) "Fri, 08 Aug 2008 08:08:08 +"

-- Testing gmdate() function with seconds since Unix Epoch format --
unicode(%d) "%d"
unicode(10) "1218182888"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmdate_variation9.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmdate_variation9.phpt
+++ php-src/ext/date/tests/gmdate_variation9.phpt
--TEST--
Test gmdate() function : usage variation - Passing Time format options to 
format argument.
--FILE--
 'a',
  'Uppercase Ante meridiem and post meridiem' =>

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests gmmktime_basic.phpt gmmktime_error.phpt gmmktime_variation1.phpt gmmktime_variation2.phpt gmmktime_variation3.phpt gmmktime_variation4.phpt gmmktime_var

2008-12-22 Thread Sanjay Mantoor
smantoorTue Dec 23 07:47:00 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests gmmktime_variation4.phpt 
gmmktime_variation5.phpt 
gmmktime_variation6.phpt 
gmmktime_variation7.phpt 
gmmktime_error.phpt 
gmmktime_variation8.phpt 
gmmktime_variation9.phpt 
gmmktime_basic.phpt 
gmmktime_variation1.phpt 
gmmktime_variation2.phpt 
gmmktime_variation3.phpt 
  Log:
  New testcases for gmmktime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmmktime_variation4.phpt
+++ php-src/ext/date/tests/gmmktime_variation4.phpt
--TEST--
Test gmmktime() function : usage variation - Passing unexpected values to 
fourth argument month.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for mon

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( gmmktime($hour, $min, $sec, $value, $day, $year) );
};

?>
===DONE===
--EXPECTF--
*** Testing gmmktime() : usage variation ***

--float 10.5--
int(1223453288)

--float -10.5--
int(1170922088)

--float .5--
int(1197101288)

--empty array--

Warning: gmmktime() expects parameter 4 to be long, array given in %s on line %d
bool(false)

--int indexed array--

Warning: gmmktime() expects parameter 4 to be long, array given in %s on line %d
bool(false)

--associative array--

Warning: gmmktime() expects parameter 4 to be long, array given in %s on line %d
bool(false)

--nested arrays--

Warning: gmmktime() expects parameter 4 to be long, array given in %s on line %d
bool(false)

--uppercase NULL--
int(1197101288)

--lowercase null--
int(1197101288)

--lowercase true--
int(1199779688)

--lowercase false--
int(1197101288)

--uppercase TRUE--
int(1199779688)

--uppercase FALSE--
int(1197101288)

--empty string DQ--

Warning: gmmktime() expects parameter 4 to be long, Unicode string given in %s 
on line %d
bool(false)

--empty string SQ--

Warning: gmmktime() expects parameter 4 to be long, Unicode string given in %s 
on line %d
bool(false)

--string DQ--

Warning: gmmktime() expects parameter 4 to be long, Unicode string given in %s 
on line %d
bool(false)

--string SQ--

Warning: gmmktime() expects parameter 4 to be long, Unicode string given in %s 
on line %d
bool(false)

--mixed case string--

Warning: gmmktime() expects parameter 4 to be long, Unicode string given in %s 
on line %d
bool(false)

--heredoc--

Warning: gmmktime() expects parameter 4 to be long, Unicode string given in %s 
on line %d
bool(false)

--instance of classWithToString--

Warning: gmmktime() expects parameter 4 to be long, object given in %s on line 
%d
bool(false)

--instance of classWithoutToString--

Warning: gmmktime() expects parameter 4 to be long, object given in %s on line 
%d
bool(false)

--undefined var--
int(1197101288)

--unset var--
int(1197101288)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmmktime_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/gmmktime_variation5.phpt
+++ php-src/ext/date/tests/gmmktime_variation5.phpt
--TEST--
Test gmmktime() function : usage variation - Passing unexpected values to fifth 
argument day.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests idate_basic.phpt idate_variation1.phpt idate_variation2.phpt idate_variation3.phpt idate_variation4.phpt idate_variation5.phpt idate_variation6.phpt

2008-12-23 Thread Sanjay Mantoor
smantoorTue Dec 23 09:13:28 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests idate_variation2.phpt idate_variation3.phpt 
idate_variation4.phpt idate_variation5.phpt 
idate_variation6.phpt idate_basic.phpt 
idate_variation1.phpt 
  Log:
  New testcases for idate function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation2.phpt
+++ php-src/ext/date/tests/idate_variation2.phpt
--TEST--
Test idate() function : usage variation - Passing unexpected values to second 
optional argument 'timestamp'.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( idate($format, $value) );
};

?>
===DONE===
--EXPECTF--
*** Testing idate() : usage variation ***

--float 10.5--
int(1970)

--float -10.5--
int(1970)

--float .5--
int(1970)

--empty array--

Warning: idate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--int indexed array--

Warning: idate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--associative array--

Warning: idate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--nested arrays--

Warning: idate() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--uppercase NULL--
int(1970)

--lowercase null--
int(1970)

--lowercase true--
int(1970)

--lowercase false--
int(1970)

--uppercase TRUE--
int(1970)

--uppercase FALSE--
int(1970)

--empty string DQ--

Warning: idate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--empty string SQ--

Warning: idate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--string DQ--

Warning: idate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--string SQ--

Warning: idate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--mixed case string--

Warning: idate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--heredoc--

Warning: idate() expects parameter 2 to be long, Unicode string given in %s on 
line %d
bool(false)

--instance of classWithToString--

Warning: idate() expects parameter 2 to be long, object given in %s on line %d
bool(false)

--instance of classWithoutToString--

Warning: idate() expects parameter 2 to be long, object given in %s on line %d
bool(false)

--undefined var--
int(1970)

--unset var--
int(1970)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation3.phpt
+++ php-src/ext/date/tests/idate_variation3.phpt
--TEST--
Test idate() function : usage variation - Passing higher positive and negetive 
float values to timestamp.
--FILE--

===DONE===
--EXPECTREGEX--
\*\*\* Testing idate\(\) : usage variation \*\*\*

-- Testing idate\(\) function with float 12.3456789000e10 to timestamp --
int\((2038|5882)\)

-- Testing idate\(\) function with float -12.3456789000e10 to timestamp --
int\((1901|-1943)\)
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/idate_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/idate_variation4.phpt
+++ php-src/ext/date/tests/idate_variation4.phpt
--TEST--
Test idate() function : usage variation - Passing supported Date format 
characters to format argument.
--FILE--
 'd',
  'Leap Year' =>'L',
  'Month number' => 'm',
  'Days in the month' => 't',
  'Day of the week' => 'w',
  'ISO-8601 week number' => 'W',
  'Year (1 or 2 digits)' 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt

2009-01-08 Thread Sanjay Mantoor
smantoorFri Jan  9 05:08:44 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests localtime_variation3.phpt 
localtime_variation4.phpt 
localtime_variation5.phpt 
localtime_basic.phpt 
localtime_variation1.phpt 
localtime_variation2.phpt 
  Log:
  New testcases for localtime function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation3.phpt
+++ php-src/ext/date/tests/localtime_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation4.phpt
+++ php-src/ext/date/tests/localtime_variation4.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation5.phpt
+++ php-src/ext/date/tests/localtime_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_basic.phpt
+++ php-src/ext/date/tests/localtime_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation1.phpt
+++ php-src/ext/date/tests/localtime_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation2.phpt
+++ php-src/ext/date/tests/localtime_variation2.phpt



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



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt

2009-01-08 Thread Sanjay Mantoor
smantoorFri Jan  9 05:09:40 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests localtime_variation5.phpt 
localtime_basic.phpt 
localtime_variation1.phpt 
localtime_variation2.phpt 
localtime_variation3.phpt 
localtime_variation4.phpt 
  Log:
  New testcases for localtime function
  

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation5.phpt
+++ php-src/ext/date/tests/localtime_variation5.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_basic.phpt
+++ php-src/ext/date/tests/localtime_basic.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation1.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation1.phpt
+++ php-src/ext/date/tests/localtime_variation1.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation2.phpt
+++ php-src/ext/date/tests/localtime_variation2.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation3.phpt
+++ php-src/ext/date/tests/localtime_variation3.phpt

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation4.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/localtime_variation4.phpt
+++ php-src/ext/date/tests/localtime_variation4.phpt



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



[PHP-CVS] cvs: php-src /ext/date/tests localtime_basic.phpt localtime_variation1.phpt localtime_variation2.phpt localtime_variation3.phpt localtime_variation4.phpt localtime_variation5.phpt

2009-01-08 Thread Sanjay Mantoor
smantoorFri Jan  9 05:10:33 2009 UTC

  Modified files:  
/php-src/ext/date/tests localtime_variation1.phpt 
localtime_variation2.phpt 
localtime_variation3.phpt 
localtime_variation4.phpt 
localtime_variation5.phpt 
localtime_basic.phpt 
  Log:
  New testcases for localtime function
  http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/localtime_variation1.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/date/tests/localtime_variation1.phpt
diff -u /dev/null php-src/ext/date/tests/localtime_variation1.phpt:1.2
--- /dev/null   Fri Jan  9 05:10:33 2009
+++ php-src/ext/date/tests/localtime_variation1.phptFri Jan  9 05:10:33 2009
@@ -0,0 +1,658 @@
+--TEST--
+Test localtime() function : usage variation - Passing unexpected values to 
first argument 'timestamp'.
+--FILE--
+ 1, 'two' => 2);
+
+//array of values to iterate over
+$inputs = array(
+
+  // float data
+  'float 10.5' => 10.5,
+  'float -10.5' => -10.5,
+  'float .5' => .5,
+
+  // array data
+  'empty array' => array(),
+  'int indexed array' => $index_array,
+  'associative array' => $assoc_array,
+  'nested arrays' => array('foo', $index_array, $assoc_array),
+
+  // null data
+  'uppercase NULL' => NULL,
+  'lowercase null' => null,
+
+  // boolean data
+  'lowercase true' => true,
+  'lowercase false' =>false,
+  'uppercase TRUE' =>TRUE,
+  'uppercase FALSE' =>FALSE,
+
+  // empty data
+  'empty string DQ' => "",
+  'empty string SQ' => '',
+
+  // string data
+  'string DQ' => "string",
+  'string SQ' => 'string',
+  'mixed case string' => "sTrInG",
+  'heredoc' => $heredoc,
+
+  // object data
+  'instance of classWithToString' => new classWithToString(),
+  'instance of classWithoutToString' => new classWithoutToString(),
+
+  // undefined data
+  'undefined var' => @$undefined_var,
+
+  // unset data
+  'unset var' => @$unset_var,
+);
+
+// loop through each element of the array for timestamp
+
+foreach($inputs as $key =>$value) {
+  echo "\n--$key--\n";
+  var_dump( localtime($value) );
+  var_dump( localtime($value, $is_associative) );
+};
+
+?>
+===DONE===
+--EXPECTF--
+*** Testing localtime() : usage variation ***
+
+--float 10.5--
+array(9) {
+  [0]=>
+  int(10)
+  [1]=>
+  int(0)
+  [2]=>
+  int(0)
+  [3]=>
+  int(1)
+  [4]=>
+  int(0)
+  [5]=>
+  int(70)
+  [6]=>
+  int(4)
+  [7]=>
+  int(0)
+  [8]=>
+  int(0)
+}
+array(9) {
+  [u"tm_sec"]=>
+  int(10)
+  [u"tm_min"]=>
+  int(0)
+  [u"tm_hour"]=>
+  int(0)
+  [u"tm_mday"]=>
+  int(1)
+  [u"tm_mon"]=>
+  int(0)
+  [u"tm_year"]=>
+  int(70)
+  [u"tm_wday"]=>
+  int(4)
+  [u"tm_yday"]=>
+  int(0)
+  [u"tm_isdst"]=>
+  int(0)
+}
+
+--float -10.5--
+array(9) {
+  [0]=>
+  int(50)
+  [1]=>
+  int(59)
+  [2]=>
+  int(23)
+  [3]=>
+  int(31)
+  [4]=>
+  int(11)
+  [5]=>
+  int(69)
+  [6]=>
+  int(3)
+  [7]=>
+  int(364)
+  [8]=>
+  int(0)
+}
+array(9) {
+  [u"tm_sec"]=>
+  int(50)
+  [u"tm_min"]=>
+  int(59)
+  [u"tm_hour"]=>
+  int(23)
+  [u"tm_mday"]=>
+  int(31)
+  [u"tm_mon"]=>
+  int(11)
+  [u"tm_year"]=>
+  int(69)
+  [u"tm_wday"]=>
+  int(3)
+  [u"tm_yday"]=>
+  int(364)
+  [u"tm_isdst"]=>
+  int(0)
+}
+
+--float .5--
+array(9) {
+  [0]=>
+  int(0)
+  [1]=>
+  int(0)
+  [2]=>
+  int(0)
+  [3]=>
+  int(1)
+  [4]=>
+  int(0)
+  [5]=>
+  int(70)
+  [6]=>
+  int(4)
+  [7]=>
+  int(0)
+  [8]=>
+  int(0)
+}
+array(9) {
+  [u"tm_sec"]=>
+  int(0)
+  [u"tm_min"]=>
+  int(0)
+  [u"tm_hour"]=>
+  int(0)
+  [u"tm_mday"]=>
+  int(1)
+  [u"tm_mon"]=>
+  int(0)
+  [u"tm_year"]=>
+  int(70)
+  [u"tm_wday"]=>
+  int(4)
+  [u"tm_yday"]=>
+  int(0)
+  [u"tm_isdst"]=>
+  int(0)
+}
+
+--empty array--
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+--int indexed array--
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+--associative array--
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+--nested arrays--
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+Warning: localtime() expects parameter 1 to be long, array given in %s on line 
%d
+bool(false)
+
+--uppercase NULL--
+array(9) {
+  [0]=>
+  int(0)
+  [1]=>
+  int(0)
+  [2]=>
+  int(0)
+  [3]=>
+  int(1)
+  [4]=>
+  int(0)
+  [5]=>
+  int(70)
+  [6]=>
+  int(4)
+  [7]=>
+  int(0)
+  [8]=>
+  int(0)
+}
+array(9) {
+  [u

[PHP-CVS] cvs: php-src /ext/date/tests strftime_basic.phpt strftime_error.phpt strftime_variation1.phpt strftime_variation10.phpt strftime_variation11.phpt strftime_variation12.phpt strftime_variation

2009-01-21 Thread Sanjay Mantoor
smantoorWed Jan 21 10:49:42 2009 UTC

  Added files: 
/php-src/ext/date/tests strftime_basic.phpt 
strftime_variation20.phpt 
strftime_variation10.phpt 
strftime_variation22.phpt 
strftime_variation12.phpt 
strftime_variation14.phpt 
strftime_variation16.phpt 
strftime_variation18.phpt 
strftime_variation1.phpt 
strftime_variation3.phpt 
strftime_variation5.phpt 
strftime_variation7.phpt 
strftime_variation9.phpt 
strftime_error.phpt 
strftime_variation21.phpt 
strftime_variation11.phpt 
strftime_variation23.phpt 
strftime_variation13.phpt 
strftime_variation15.phpt 
strftime_variation17.phpt 
strftime_variation19.phpt 
strftime_variation2.phpt 
strftime_variation4.phpt 
strftime_variation6.phpt 
strftime_variation8.phpt 
  Log:
  New testcases for strftime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_basic.phpt
+++ php-src/ext/date/tests/strftime_basic.phpt
--TEST--
Test strftime() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing strftime() : basic functionality ***
unicode(20) "Aug 08 2008 08:08:08"
unicode(%d) "%s %d %d %d:%d:%d"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation20.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation20.phpt
+++ php-src/ext/date/tests/strftime_variation20.phpt
--TEST--
Test strftime() function : usage variation - Checking newline and tab formats 
which are supported other than on Windows.
--SKIPIF--

--FILE--
 "%n",
  'Tab character' => "%t"
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
} 

?>
===DONE===
--EXPECTREGEX--
\*\*\* Testing strftime\(\) : usage variation \*\*\*

--Newline character--
unicode\(1\) "
"
unicode\(1\) "
"

--Tab character--
unicode\(1\) "\s"
unicode\(1\) "\s"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation10.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation10.phpt
+++ php-src/ext/date/tests/strftime_variation10.phpt
--TEST--
Test strftime() function : usage variation - Checking week related formats 
which are supported other than on Windows.
--SKIPIF--

--FILE--
 "%V",
  'Weekday as decimal' => "%u",
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
echo "\n--$key--\n";
var_dump( strftime($value) );
var_dump( strftime($value, $timestamp) );
}   

?>
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--The ISO 8601:1988 week number--
unicode(%d) "%d"
unicode(2) "32"

--Weekday as decimal--
unicode(%d) "%d"
unicode(1) "5"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation22.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation22.phpt
+++ php-src/ext/date/tests/strftime_variation22.phpt
--TEST--
Test strftime() function : usage variation - Checking Preferred date and time 
representation other than on Windows.
--SKIPIF--

--FILE--
 "%c",
  'Preferred date representation' => "%x",
  'Preferred time representation' => "%X",
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
} 

?>
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--Preferred date and time representation--
unicode(%d) "%s %s %d %d:%d:%d %d"
unicode(24) "Fri Aug  8 08:08:08 2008"

--Preferred date representation--
unicode(%d) "%d/%d/%d"
unicode(8) "08/08/08"

--Preferred time representation--
unicode(%d) "%d:%d:%d"
unicode(8) "08:08:08"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation12.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation12.phpt
+++ php-src/ext/date/tests/strftime_variation12.phpt
--TEST--
Test strftime() function : usage variation - Checking month re

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/date/tests strftime_basic.phpt strftime_error.phpt strftime_variation1.phpt strftime_variation10.phpt strftime_variation11.phpt strftime_variation12.phpt strftime_

2009-01-21 Thread Sanjay Mantoor
smantoorWed Jan 21 10:52:38 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/date/tests strftime_basic.phpt 
strftime_variation2.phpt 
strftime_variation20.phpt 
strftime_variation10.phpt 
strftime_variation22.phpt 
strftime_variation4.phpt 
strftime_variation12.phpt 
strftime_variation6.phpt 
strftime_variation14.phpt 
strftime_variation8.phpt 
strftime_variation16.phpt 
strftime_variation18.phpt 
strftime_error.phpt 
strftime_variation1.phpt 
strftime_variation21.phpt 
strftime_variation3.phpt 
strftime_variation11.phpt 
strftime_variation23.phpt 
strftime_variation5.phpt 
strftime_variation13.phpt 
strftime_variation7.phpt 
strftime_variation15.phpt 
strftime_variation9.phpt 
strftime_variation17.phpt 
strftime_variation19.phpt 
  Log:
  New testcases for strftime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_basic.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_basic.phpt
+++ php-src/ext/date/tests/strftime_basic.phpt
--TEST--
Test strftime() function : basic functionality 
--FILE--

===DONE===
--EXPECTF--
*** Testing strftime() : basic functionality ***
unicode(20) "Aug 08 2008 08:08:08"
unicode(%d) "%s %d %d %d:%d:%d"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation2.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation2.phpt
+++ php-src/ext/date/tests/strftime_variation2.phpt
--TEST--
Test strftime() function : usage variation - Passing unexpected values to 
second argument 'timestamp'.
--FILE--
 1, 'two' => 2);

//array of values to iterate over
$inputs = array(

  // float data
  'float 10.5' => 10.5,
  'float -10.5' => -10.5,
  'float .5' => .5,

  // array data
  'empty array' => array(),
  'int indexed array' => $index_array,
  'associative array' => $assoc_array,
  'nested arrays' => array('foo', $index_array, $assoc_array),

  // null data
  'uppercase NULL' => NULL,
  'lowercase null' => null,

  // boolean data
  'lowercase true' => true,
  'lowercase false' =>false,
  'uppercase TRUE' =>TRUE,
  'uppercase FALSE' =>FALSE,

  // empty data
  'empty string DQ' => "",
  'empty string SQ' => '',

  // string data
  'string DQ' => "string",
  'string SQ' => 'string',
  'mixed case string' => "sTrInG",
  'heredoc' => $heredoc,

  // object data
  'instance of classWithToString' => new classWithToString(),
  'instance of classWithoutToString' => new classWithoutToString(),

  // undefined data
  'undefined var' => @$undefined_var,

  // unset data
  'unset var' => @$unset_var,
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( strftime($format, $value) );
};

?>
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--float 10.5--
unicode(20) "Jan 01 1970 05:30:10"

--float -10.5--
unicode(20) "Jan 01 1970 05:29:50"

--float .5--
unicode(20) "Jan 01 1970 05:30:00"

--empty array--

Warning: strftime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--int indexed array--

Warning: strftime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--associative array--

Warning: strftime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--nested arrays--

Warning: strftime() expects parameter 2 to be long, array given in %s on line %d
bool(false)

--uppercase NULL--
unicode(20) "Jan 01 1970 05:30:00"

--lowercase null--
unicode(20) "Jan 01 1970 05:30:00"

--lowercase true--
unicode(20) "Jan 01 1970 05:30:01"

--lowercase false--
unicode(20) "Jan 01 1970 05:30:00"

--uppercase TRUE--
unicode(20) "Jan 01 1970 05:30:01"

--uppercase FALSE--
unicode(20) "Jan 01 1970 05:30:00"

--empty string DQ--

Warning: strftime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--empty string SQ--

Warning: strftime() expects parameter 2 to be long, Unicode string given in %s 
on line %d
bool(false)

--string DQ--

Warning: strftime() expects parameter 2 to be long, Unicode string given in 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests strftime_basic.phpt strftime_error.phpt strftime_variation1.phpt strftime_variation10.phpt strftime_variation11.phpt strftime_variation12.phpt strftime_

2009-01-21 Thread Sanjay Mantoor
smantoorWed Jan 21 10:51:04 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/date/tests strftime_variation14.phpt 
strftime_variation3.phpt 
strftime_variation16.phpt 
strftime_variation5.phpt 
strftime_variation18.phpt 
strftime_variation7.phpt 
strftime_variation9.phpt 
strftime_error.phpt 
strftime_variation21.phpt 
strftime_variation11.phpt 
strftime_variation23.phpt 
strftime_variation13.phpt 
strftime_variation2.phpt 
strftime_variation15.phpt 
strftime_variation4.phpt 
strftime_variation17.phpt 
strftime_variation6.phpt 
strftime_variation19.phpt 
strftime_variation8.phpt 
strftime_basic.phpt 
strftime_variation20.phpt 
strftime_variation10.phpt 
strftime_variation22.phpt 
strftime_variation12.phpt 
strftime_variation1.phpt 
  Log:
  New testcases for strftime function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation14.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation14.phpt
+++ php-src/ext/date/tests/strftime_variation14.phpt
--TEST--
Test strftime() function : usage variation - Checking date related formats 
which are supported other than on Windows.
--SKIPIF--

--FILE--
 "%C",
  'Month Date Year' => "%D",
  'Year with century' => "%G",
  'Year without century' => "%g",
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
} 

?>
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--Century number--
unicode(%d) "%d"
unicode(2) "20"

--Month Date Year--
unicode(%d) "%d/%d/%d"
unicode(8) "08/08/08"

--Year with century--
unicode(%d) "%d"
unicode(4) "2008"

--Year without century--
unicode(%d) "%d"
unicode(2) "08"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation3.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation3.phpt
+++ php-src/ext/date/tests/strftime_variation3.phpt
--TEST--
Test strftime() function : usage variation - Passing week related format 
strings to format argument.
--FILE--
 "%a",
  'Full weekday name' => "%A",
  'Week number of the year' => "%U",
  'Week number of the year in decimal number' => "%W",  
);
// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
};

?>
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--Abbreviated weekday name--
unicode(%d) "%s"
unicode(3) "Fri"

--Full weekday name--
unicode(%d) "%s"
unicode(6) "Friday"

--Week number of the year--
unicode(%d) "%d"
unicode(2) "31"

--Week number of the year in decimal number--
unicode(%d) "%d"
unicode(2) "31"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation16.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation16.phpt
+++ php-src/ext/date/tests/strftime_variation16.phpt
--TEST--
Test strftime() function : usage variation - Checking time related formats 
which are supported other than on Windows.
--SKIPIF--

--FILE--
 "%r",
  'Time in 24 hour notation' => "%R",
  'Current time %H:%M:%S format' => "%T",
);

// loop through each element of the array for timestamp

foreach($inputs as $key =>$value) {
  echo "\n--$key--\n";
  var_dump( strftime($value) );
  var_dump( strftime($value, $timestamp) );
} 

?>
===DONE===
--EXPECTF--
*** Testing strftime() : usage variation ***

--Time in a.m/p.m notation--
unicode(%d) "%d:%d:%d %s"
unicode(11) "08:08:08 AM"

--Time in 24 hour notation--
unicode(%d) "%d:%d"
unicode(5) "08:08"

--Current time %H:%M:%S format--
unicode(%d) "%d:%d:%d"
unicode(8) "08:08:08"
===DONE===

http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation5.phpt?view=markup&rev=1.1
Index: php-src/ext/date/tests/strftime_variation5.phpt
+++ php-src/ext/date/tests/strftime_variation5.phpt
--TEST--
Test strftime() function : usage variation - Passing date related format 
strings to format argument.
--FILE--
 "

Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/date/tests gmstrftime_variation22.phpt strftime_variation22.phpt

2009-01-27 Thread Sanjay Mantoor
Derick,

It looks some problem. I will look into it and update you.

Thanks,
Sanjay Mantoor

On Tue, Jan 27, 2009 at 7:52 PM, Derick Rethans  wrote:
> derick  Tue Jan 27 14:22:18 2009 UTC
>
>  Modified files:  (Branch: PHP_5_3)
>/php-src/ext/date/tests gmstrftime_variation22.phpt
>strftime_variation22.phpt
>  Log:
>  - Fixed tests?
>  #- Wondering why those are not in HEAD though...
>
>
> http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/gmstrftime_variation22.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u
> Index: php-src/ext/date/tests/gmstrftime_variation22.phpt
> diff -u php-src/ext/date/tests/gmstrftime_variation22.phpt:1.1.4.2 
> php-src/ext/date/tests/gmstrftime_variation22.phpt:1.1.4.3
> --- php-src/ext/date/tests/gmstrftime_variation22.phpt:1.1.4.2  Thu Jan 22 
> 18:47:20 2009
> +++ php-src/ext/date/tests/gmstrftime_variation22.phpt  Tue Jan 27 14:22:17 
> 2009
> @@ -18,7 +18,7 @@
>
>  // Initialise function arguments not being substituted (if any)
>  $timestamp = gmmktime(8, 8, 8, 8, 8, 2008);
> -setlocale(LC_ALL, "en_US");
> +setlocale(LC_ALL, "en_US.utf8", "en_US");
>  date_default_timezone_set("Asia/Calcutta");
>
>  //array of values to iterate over
> http://cvs.php.net/viewvc.cgi/php-src/ext/date/tests/strftime_variation22.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u
> Index: php-src/ext/date/tests/strftime_variation22.phpt
> diff -u php-src/ext/date/tests/strftime_variation22.phpt:1.1.2.2 
> php-src/ext/date/tests/strftime_variation22.phpt:1.1.2.3
> --- php-src/ext/date/tests/strftime_variation22.phpt:1.1.2.2Wed Jan 21 
> 10:51:04 2009
> +++ php-src/ext/date/tests/strftime_variation22.phptTue Jan 27 14:22:17 
> 2009
> @@ -17,7 +17,7 @@
>  echo "*** Testing strftime() : usage variation ***\n";
>
>  // Initialise function arguments not being substituted (if any)
> -setlocale(LC_ALL, "en_US");
> +setlocale(LC_ALL, "en_US.utf8", "en_US");
>  date_default_timezone_set("Asia/Calcutta");
>  $timestamp = mktime(8, 8, 8, 8, 8, 2008);
>
>
>
>
> --
> PHP CVS Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Thanks,
Sanjay Mantoor

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