@@ -59,7 +59,7 @@ public function testLdapAddAndRemove()
59
59
*/
60
60
public function testLdapAddInvalidEntry ()
61
61
{
62
- $ this ->setExpectedException (LdapException::class);
62
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (LdapException::class);
63
63
$ this ->executeSearchQuery (1 );
64
64
65
65
// The entry is missing a subject name
@@ -105,7 +105,7 @@ public function testLdapUpdate()
105
105
public function testLdapUnboundAdd ()
106
106
{
107
107
$ this ->adapter = new Adapter ($ this ->getLdapConfig ());
108
- $ this ->setExpectedException (NotBoundException::class);
108
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (NotBoundException::class);
109
109
$ em = $ this ->adapter ->getEntryManager ();
110
110
$ em ->add (new Entry ('' ));
111
111
}
@@ -116,7 +116,7 @@ public function testLdapUnboundAdd()
116
116
public function testLdapUnboundRemove ()
117
117
{
118
118
$ this ->adapter = new Adapter ($ this ->getLdapConfig ());
119
- $ this ->setExpectedException (NotBoundException::class);
119
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (NotBoundException::class);
120
120
$ em = $ this ->adapter ->getEntryManager ();
121
121
$ em ->remove (new Entry ('' ));
122
122
}
@@ -127,7 +127,7 @@ public function testLdapUnboundRemove()
127
127
public function testLdapUnboundUpdate ()
128
128
{
129
129
$ this ->adapter = new Adapter ($ this ->getLdapConfig ());
130
- $ this ->setExpectedException (NotBoundException::class);
130
+ $ this ->{ method_exists ( $ this , $ _ = ' expectException ' ) ? $ _ : ' setExpectedException ' } (NotBoundException::class);
131
131
$ em = $ this ->adapter ->getEntryManager ();
132
132
$ em ->update (new Entry ('' ));
133
133
}
0 commit comments