~ubuntu-dev/ubuntu/lucid/php5/lucid-201002110915

« back to all changes in this revision

Viewing changes to ext/posix/tests/posix_setuid_variation1.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-06 01:44:25 UTC
  • mfrom: (1.1.15 upstream) (0.3.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091106014425-5dsqjhbg303h3kfn
Tags: 5.2.11.dfsg.1-1ubuntu1
* Merge from debian testing, remaining changes:
  - debian/control, debian/rules: Disable a few build dependencies and
    accompanying, binary packages which we do not want to support in main:
    + firebird2-dev/php5-interbase (we have a seperate php-interbase source)
    + libc-client/php5-imap (we have a seperate php-imap source)
    + libmcrypt-dev/php5-mcrypt (seperate php-mycrpt source)
    + readline support again, now that the libedit issue is fixed.
  - debian/control: Add build dependency: libdedit-dev (>= 2.9.cvs.20050518-1)
    CLI readline support.
  - debian/rules:
    + Correctly mangle PHP5_* macros for lpia
  - debian/control:
    + Use libdb-4.6-dev.
    + Rename Vcs-Browser & Vcs-Git to XS-Original-Vcs-Browser & XS-Original-Vcs-Git (LP: #323731).
  - Dropped patches:
    - debian/patches/119-sybase-alias.patch: Use Debian's patch.
    - debian/patches/fix-autoconf-ftbfs.patch: Use Debian's patch
    - debian/patches/fix-zlib-decompression: Already in upstream
  - Use the default pear/install-pear-nozlib.phar in php 5.2.11
  - debian/control: Move php5-suhoshin to Suggests.
  - debian/rules: Fix broken symlink for pear.
  - Dropped dependency on autoconf2.13.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Test function posix_setuid() by substituting argument 1 with array values.
 
3
--SKIPIF--
 
4
<?php 
 
5
        if(!extension_loaded("posix")) print "skip - POSIX extension not loaded"; 
 
6
?>
 
7
--CREDITS--
 
8
Marco Fabbri mrfabbri@gmail.com
 
9
Francesco Fullone ff@ideato.it
 
10
#PHPTestFest Cesena Italia on 2009-06-20
 
11
--FILE--
 
12
<?php
 
13
 
 
14
$index_array = array(1, 2, 3);
 
15
$assoc_array = array(1 => 'one', 2 => 'two');
 
16
 
 
17
$variation_array = array(
 
18
  'empty array' => array(),
 
19
  'int indexed array' => $index_array,
 
20
  'associative array' => $assoc_array,
 
21
  'nested arrays' => array('foo', $index_array, $assoc_array),
 
22
  );
 
23
 
 
24
 
 
25
foreach ( $variation_array as $var ) {
 
26
  var_dump(posix_setuid( $var  ) );
 
27
}
 
28
 
 
29
?>
 
30
--EXPECTF--
 
31
Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
 
32
bool(false)
 
33
 
 
34
Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
 
35
bool(false)
 
36
 
 
37
Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
 
38
bool(false)
 
39
 
 
40
Warning: posix_setuid() expects parameter 1 to be long, array given in %s on line 15
 
41
bool(false)