File tree 2 files changed +48
-2
lines changed
2 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1
1
suites:
2
2
main:
3
- namespace: Acme\SyliusExamplePlugin
4
- psr4_prefix: Acme\SyliusExamplePlugin
3
+ namespace: Locastic\SyliusHTPayWayPlugin
4
+ psr4_prefix: Locastic\SyliusHTPayWayPlugin
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace spec \Locastic \SyliusHTPayWayPlugin \Action ;
4
+
5
+ use Locastic \SyliusHTPayWayPlugin \Action \StatusAction ;
6
+ use Payum \Core \Action \ActionInterface ;
7
+ use Payum \Core \ApiAwareInterface ;
8
+ use Payum \Core \Request \GetStatusInterface ;
9
+ use PhpSpec \ObjectBehavior ;
10
+
11
+ class StatusActionSpec extends ObjectBehavior
12
+ {
13
+ function it_is_initializable ()
14
+ {
15
+ $ this ->shouldHaveType (StatusAction::class);
16
+ }
17
+
18
+ function it_implements_action_interface (): void
19
+ {
20
+ $ this ->shouldHaveType (ActionInterface::class);
21
+ }
22
+
23
+ function it_implements_api_aware_interface (): void
24
+ {
25
+ $ this ->shouldHaveType (ApiAwareInterface::class);
26
+ }
27
+
28
+ function it_executes (
29
+ GetStatusInterface $ request ,
30
+ \ArrayAccess $ arrayAccess
31
+ ): void {
32
+ $ request ->getModel ()->willReturn ($ arrayAccess );
33
+
34
+ $ request ->markNew ()->shouldBeCalled ();
35
+
36
+ $ this ->execute ($ request );
37
+ }
38
+
39
+ function it_supports_only_get_status_request_and_array_access (
40
+ GetStatusInterface $ request ,
41
+ \ArrayAccess $ arrayAccess
42
+ ): void {
43
+ $ request ->getModel ()->willReturn ($ arrayAccess );
44
+ $ this ->supports ($ request )->shouldReturn (true );
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments