Annotation of embedaddon/php/ext/ldap/tests/ldap_mod_add_basic.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: ldap_mod_add() - Basic modify operation
        !             3: --CREDITS--
        !             4: Patrick Allaert <patrickallaert@php.net>
        !             5: # Belgian PHP Testfest 2009
        !             6: --SKIPIF--
        !             7: <?php require_once('skipif.inc'); ?>
        !             8: <?php require_once('skipifbindfailure.inc'); ?>
        !             9: --FILE--
        !            10: <?php
        !            11: require "connect.inc";
        !            12: 
        !            13: $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
        !            14: insert_dummy_data($link);
        !            15: 
        !            16: $entry = array(
        !            17:        "description"   => "Domain description",
        !            18: );
        !            19: 
        !            20: var_dump(
        !            21:        ldap_mod_add($link, "dc=my-domain,dc=com", $entry),
        !            22:        ldap_get_entries(
        !            23:                $link,
        !            24:                ldap_search($link, "dc=my-domain,dc=com", "(Description=Domain description)")
        !            25:        )
        !            26: );
        !            27: ?>
        !            28: ===DONE===
        !            29: --CLEAN--
        !            30: <?php
        !            31: require "connect.inc";
        !            32: 
        !            33: $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
        !            34: 
        !            35: remove_dummy_data($link);
        !            36: ?>
        !            37: --EXPECT--
        !            38: bool(true)
        !            39: array(2) {
        !            40:   ["count"]=>
        !            41:   int(1)
        !            42:   [0]=>
        !            43:   array(10) {
        !            44:     ["objectclass"]=>
        !            45:     array(4) {
        !            46:       ["count"]=>
        !            47:       int(3)
        !            48:       [0]=>
        !            49:       string(3) "top"
        !            50:       [1]=>
        !            51:       string(8) "dcObject"
        !            52:       [2]=>
        !            53:       string(12) "organization"
        !            54:     }
        !            55:     [0]=>
        !            56:     string(11) "objectclass"
        !            57:     ["dc"]=>
        !            58:     array(2) {
        !            59:       ["count"]=>
        !            60:       int(1)
        !            61:       [0]=>
        !            62:       string(9) "my-domain"
        !            63:     }
        !            64:     [1]=>
        !            65:     string(2) "dc"
        !            66:     ["o"]=>
        !            67:     array(2) {
        !            68:       ["count"]=>
        !            69:       int(1)
        !            70:       [0]=>
        !            71:       string(9) "my-domain"
        !            72:     }
        !            73:     [2]=>
        !            74:     string(1) "o"
        !            75:     ["description"]=>
        !            76:     array(2) {
        !            77:       ["count"]=>
        !            78:       int(1)
        !            79:       [0]=>
        !            80:       string(18) "Domain description"
        !            81:     }
        !            82:     [3]=>
        !            83:     string(11) "description"
        !            84:     ["count"]=>
        !            85:     int(4)
        !            86:     ["dn"]=>
        !            87:     string(19) "dc=my-domain,dc=com"
        !            88:   }
        !            89: }
        !            90: ===DONE===

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