@@ -59,7 +59,7 @@ public function testLdapAddAndRemove()
5959 */
6060 public function testLdapAddInvalidEntry ()
6161 {
62- $ this ->setExpectedException (LdapException::class);
62+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (LdapException::class);
6363 $ this ->executeSearchQuery (1 );
6464
6565 // The entry is missing a subject name
@@ -105,7 +105,7 @@ public function testLdapUpdate()
105105 public function testLdapUnboundAdd ()
106106 {
107107 $ this ->adapter = new Adapter ($ this ->getLdapConfig ());
108- $ this ->setExpectedException (NotBoundException::class);
108+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (NotBoundException::class);
109109 $ em = $ this ->adapter ->getEntryManager ();
110110 $ em ->add (new Entry ('' ));
111111 }
@@ -116,7 +116,7 @@ public function testLdapUnboundAdd()
116116 public function testLdapUnboundRemove ()
117117 {
118118 $ this ->adapter = new Adapter ($ this ->getLdapConfig ());
119- $ this ->setExpectedException (NotBoundException::class);
119+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (NotBoundException::class);
120120 $ em = $ this ->adapter ->getEntryManager ();
121121 $ em ->remove (new Entry ('' ));
122122 }
@@ -127,7 +127,7 @@ public function testLdapUnboundRemove()
127127 public function testLdapUnboundUpdate ()
128128 {
129129 $ this ->adapter = new Adapter ($ this ->getLdapConfig ());
130- $ this ->setExpectedException (NotBoundException::class);
130+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (NotBoundException::class);
131131 $ em = $ this ->adapter ->getEntryManager ();
132132 $ em ->update (new Entry ('' ));
133133 }
0 commit comments