File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ public function test_setting_ldap_connection_initializes_it()
9494 public function test_is_connected ()
9595 {
9696 $ ldap = $ this ->newConnectedLdapMock ();
97- $ ldap ->shouldReceive ('isBound ' )->once ()->withNoArgs ()->andReturnTrue ();
9897 $ conn = new Connection ([], $ ldap );
9998 $ this ->assertTrue ($ conn ->isConnected ());
10099 }
Original file line number Diff line number Diff line change @@ -10,7 +10,8 @@ trait CreatesConnectedLdapMocks
1010 protected function newConnectedLdapMock ()
1111 {
1212 $ ldap = m::mock (Ldap::class);
13- $ ldap ->shouldReceive ('connect ' )->once ();
13+ $ ldap ->shouldReceive ('connect ' )->andReturnTrue ();
14+ $ ldap ->shouldReceive ('isBound ' )->andReturnTrue ();
1415 $ ldap ->shouldReceive ('setOptions ' )->once ();
1516
1617 return $ ldap ;
Original file line number Diff line number Diff line change @@ -949,6 +949,7 @@ public function test_getting_results_sets_ldap_controls()
949949 $ b = $ this ->newBuilder ();
950950
951951 $ ldap = $ b ->getConnection ()->getLdapConnection ();
952+ $ ldap ->shouldReceive ('isBound ' )->andReturnTrue ();
952953 $ ldap ->shouldReceive ('setOption ' )->once ()->withArgs ([LDAP_OPT_SERVER_CONTROLS , []]);
953954 $ ldap ->shouldReceive ('search ' )->once ()->andReturnNull ();
954955 $ ldap ->shouldReceive ('getEntries ' )->once ()->andReturnNull ();
You can’t perform that action at this time.
0 commit comments