File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Fhp ;
4+
5+ use Tests \Fhp \Integration \DKB \SendSEPATransferTest as DKBSendSEPATransferTest ;
6+
7+ class BaseActionTanSerializationTest extends DKBSendSEPATransferTest
8+ {
9+ /**
10+ * @throws \Throwable
11+ */
12+ public function testSerializesTanRequest ()
13+ {
14+ // We piggy-back on the DKB integration test to provide an action that has some reasonable data inside and that
15+ // has already been executed so that a TAN request is present.
16+ $ this ->initDialog ();
17+ $ this ->expectMessage ($ this ->getSendTransferRequest (), static ::SEND_TRANSFER_RESPONSE );
18+ $ originalAction = $ this ->runInitialRequest ();
19+
20+ // Sanity-check that the TAN request is present.
21+ $ this ->assertNotNull ($ originalAction ->getTanRequest ());
22+ $ this ->assertNotNull ($ originalAction ->getNeedTanForSegment ());
23+
24+ // Do a serialization roundtrip.
25+ $ serializedAction = serialize ($ originalAction );
26+ $ unserializedAction = unserialize ($ serializedAction );
27+
28+ // Verify that the TAN request hasn't changed.
29+ $ this ->assertEquals ($ originalAction ->getTanRequest (), $ unserializedAction ->getTanRequest ());
30+ $ this ->assertEquals ($ originalAction ->getNeedTanForSegment (), $ unserializedAction ->getNeedTanForSegment ());
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments