File tree 1 file changed +35
-0
lines changed
src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap
1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /*
3
+ * This file is part of the Symfony package.
4
+ *
5
+ * (c) Fabien Potencier <fabien@symfony.com>
6
+ *
7
+ * For the full copyright and license information, please view the LICENSE
8
+ * file that was distributed with this source code.
9
+ */
10
+
11
+ namespace Symfony \Component \Ldap \Tests \Adapter \ExtLdap ;
12
+
13
+ use PHPUnit \Framework \TestCase ;
14
+ use Symfony \Component \Ldap \Adapter \ExtLdap \Connection ;
15
+ use Symfony \Component \Ldap \Adapter \ExtLdap \EntryManager ;
16
+ use Symfony \Component \Ldap \Entry ;
17
+
18
+ class EntryManagerTest extends TestCase
19
+ {
20
+ /**
21
+ * @expectedException \Symfony\Component\Ldap\Exception\NotBoundException
22
+ * @expectedExceptionMessage Query execution is not possible without binding the connection first.
23
+ */
24
+ public function testGetResources ()
25
+ {
26
+ $ connection = $ this ->getMockBuilder (Connection::class)->getMock ();
27
+ $ connection
28
+ ->expects ($ this ->once ())
29
+ ->method ('isBound ' )->willReturn (false );
30
+
31
+ $ entry = new Entry ('$$$$$$ ' );
32
+ $ entryManager = new EntryManager ($ connection );
33
+ $ entryManager ->update ($ entry );
34
+ }
35
+ }
You can’t perform that action at this time.
0 commit comments