@@ -114,12 +114,8 @@ public function testAuthenticateFailureIdentityNotFound()
114114 $ this ->_adapter ->setIdentity ('non_existent_username ' );
115115 $ this ->_adapter ->setCredential ('my_password ' );
116116
117- try {
118- $ result = $ this ->_adapter ->authenticate ();
119- $ this ->assertEquals (Authentication \Result::FAILURE_IDENTITY_NOT_FOUND , $ result ->getCode ());
120- } catch (Adapter \Exception \RuntimeException $ e ) {
121- $ this ->fail ('Exception should have been thrown ' );
122- }
117+ $ result = $ this ->_adapter ->authenticate ();
118+ $ this ->assertEquals (Authentication \Result::FAILURE_IDENTITY_NOT_FOUND , $ result ->getCode ());
123119 }
124120
125121 /**
@@ -134,12 +130,8 @@ public function testAuthenticateFailureIdentityAmbiguous()
134130 $ this ->_adapter ->setIdentity ('my_username ' );
135131 $ this ->_adapter ->setCredential ('my_password ' );
136132
137- try {
138- $ result = $ this ->_adapter ->authenticate ();
139- $ this ->assertEquals (Authentication \Result::FAILURE_IDENTITY_AMBIGUOUS , $ result ->getCode ());
140- } catch (Adapter \Exception \RuntimeException $ e ) {
141- $ this ->fail ('Exception should have been thrown ' );
142- }
133+ $ result = $ this ->_adapter ->authenticate ();
134+ $ this ->assertEquals (Authentication \Result::FAILURE_IDENTITY_AMBIGUOUS , $ result ->getCode ());
143135 }
144136
145137 /**
@@ -208,12 +200,9 @@ public function testAdapterCanUseModifiedDbSelectObject()
208200 $ select ->where ('1 = 0 ' );
209201 $ this ->_adapter ->setIdentity ('my_username ' );
210202 $ this ->_adapter ->setCredential ('my_password ' );
211- try {
212- $ result = $ this ->_adapter ->authenticate ();
213- $ this ->assertEquals (Authentication \Result::FAILURE_IDENTITY_NOT_FOUND , $ result ->getCode ());
214- } catch (Adapter \Exception \RuntimeException $ e ) {
215- $ this ->fail ('Exception should have been thrown ' );
216- }
203+
204+ $ result = $ this ->_adapter ->authenticate ();
205+ $ this ->assertEquals (Authentication \Result::FAILURE_IDENTITY_NOT_FOUND , $ result ->getCode ());
217206 }
218207
219208 /**
0 commit comments