-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
EntryManagerTest.php
35 lines (31 loc) · 1.06 KB
/
EntryManagerTest.php
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
29
30
31
32
33
34
35
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Ldap\Tests\Adapter\ExtLdap;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Ldap\Adapter\ExtLdap\Connection;
use Symfony\Component\Ldap\Adapter\ExtLdap\EntryManager;
use Symfony\Component\Ldap\Entry;
class EntryManagerTest extends TestCase
{
/**
* @expectedException \Symfony\Component\Ldap\Exception\NotBoundException
* @expectedExceptionMessage Query execution is not possible without binding the connection first.
*/
public function testGetResources()
{
$connection = $this->getMockBuilder(Connection::class)->getMock();
$connection
->expects($this->once())
->method('isBound')->willReturn(false);
$entry = new Entry('$$$$$$');
$entryManager = new EntryManager($connection);
$entryManager->update($entry);
}
}