File: EntryTest.php

package info (click to toggle)
php-horde-ldap 2.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 456 kB
  • ctags: 897
  • sloc: php: 3,771; xml: 481; sh: 3; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 838 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
 * Copyright 2010-2014 Horde LLC (http://www.horde.org/)
 *
 * @package    Ldap
 * @subpackage UnitTests
 * @author     Jan Schneider <jan@horde.org>
 * @license    http://www.gnu.org/licenses/lgpl-3.0.html LGPL-3.0
 */

class Horde_Ldap_EntryTest extends PHPUnit_Framework_TestCase
{
    /**
     * @expectedException PHPUnit_Framework_Error
     */
    public function testCreateFreshFail()
    {
        $entry = Horde_Ldap_Entry::createFresh('cn=test', 'I should be an array');
    }

    public function testCreateFreshSuccess()
    {
        $entry = Horde_Ldap_Entry::createFresh('cn=test',
                                               array('attr1' => 'single',
                                                     'attr2' => array('mv1', 'mv2')));
        $this->assertInstanceOf('Horde_Ldap_Entry', $entry);
    }
}