11
11
12
12
namespace Symfony \Component \Security \Core \Tests \Exception ;
13
13
14
- use Symfony \Component \Security \Core \Exception \AuthenticationException ;
15
14
use Symfony \Component \Security \Core \Exception \SafeMessageAuthenticationException ;
16
15
17
16
class SafeMessageAuthenticationExceptionTest extends \PHPUnit_Framework_TestCase
@@ -24,30 +23,4 @@ public function testConstructWithSAfeMessage()
24
23
$ this ->assertEquals (array ('foo ' => true ), $ e ->getMessageData ());
25
24
$ this ->assertEquals ('SAFE MESSAGE ' , $ e ->getMessage ());
26
25
}
27
-
28
- /**
29
- * @dataProvider provideKeysAndData
30
- */
31
- public function testMessageKeyAndData ($ key , array $ data , $ expectedKey , array $ expectedData )
32
- {
33
- $ e = new SafeMessageAuthenticationException ();
34
- $ e ->setSafeMessage ($ key , $ data );
35
-
36
- $ this ->assertEquals ($ expectedKey , $ e ->getMessageKey ());
37
- $ this ->assertEquals ($ expectedData , $ e ->getMessageData ());
38
- }
39
-
40
- public function provideKeysAndData ()
41
- {
42
- // the parent exception
43
- $ authenticationException = new AuthenticationException ();
44
-
45
- $ tests = array ();
46
- // null key means the parent is used
47
- $ tests [] = array (null , array (), $ authenticationException ->getMessageKey (), array ());
48
- $ tests [] = array ('' , array (), '' , array ());
49
- $ tests [] = array ('MESSAGE ' , array ('bar ' => false ), 'MESSAGE ' , array ('bar ' => false ));
50
-
51
- return $ tests ;
52
- }
53
26
}
0 commit comments