9
9
use Hypernode \Api \Exception \HypernodeApiServerException ;
10
10
use Hypernode \Api \HypernodeClientTestCase ;
11
11
12
- class EphemeralAppTest extends HypernodeClientTestCase
12
+ class BrancherAppTest extends HypernodeClientTestCase
13
13
{
14
- public function testCreateEphemeralApp ()
14
+ public function testCreateBrancherApp ()
15
15
{
16
16
$ this ->responses ->append (
17
17
new Response (200 , [], json_encode ([
18
18
'name ' => 'johndoe-eph123456 ' ,
19
19
'parent ' => 'johndoe ' ,
20
- 'type ' => 'ephemeral ' ,
20
+ 'type ' => 'brancher ' ,
21
21
])),
22
22
);
23
23
24
- $ ephemeralAppName = $ this ->client ->ephemeralApp ->create ('johndoe ' );
24
+ $ brancherAppName = $ this ->client ->brancherApp ->create ('johndoe ' );
25
25
26
26
$ request = $ this ->responses ->getLastRequest ();
27
27
$ this ->assertEquals ('POST ' , $ request ->getMethod ());
28
- $ this ->assertEquals ('/v2/app/johndoe/ephemeral / ' , $ request ->getUri ());
29
- $ this ->assertEquals ('johndoe-eph123456 ' , $ ephemeralAppName );
28
+ $ this ->assertEquals ('/v2/app/johndoe/brancher / ' , $ request ->getUri ());
29
+ $ this ->assertEquals ('johndoe-eph123456 ' , $ brancherAppName );
30
30
}
31
31
32
- public function testCreateEphemeralAppRaisesClientExceptions ()
32
+ public function testCreateBrancherAppRaisesClientExceptions ()
33
33
{
34
34
$ badRequestResponse = new Response (400 , [], json_encode ([
35
35
'non_field_errors ' => ['Your request was invalid. ' ]
@@ -38,10 +38,10 @@ public function testCreateEphemeralAppRaisesClientExceptions()
38
38
39
39
$ this ->expectExceptionObject (new HypernodeApiClientException ($ badRequestResponse ));
40
40
41
- $ this ->client ->ephemeralApp ->create ('johndoe ' );
41
+ $ this ->client ->brancherApp ->create ('johndoe ' );
42
42
}
43
43
44
- public function testCreateEphemeralAppRaisesServerExceptions ()
44
+ public function testCreateBrancherAppRaisesServerExceptions ()
45
45
{
46
46
$ badRequestResponse = new Response (500 , [], json_encode ([
47
47
'non_field_errors ' => ['Something went wrong processing your request. ' ]
@@ -50,23 +50,23 @@ public function testCreateEphemeralAppRaisesServerExceptions()
50
50
51
51
$ this ->expectExceptionObject (new HypernodeApiServerException ($ badRequestResponse ));
52
52
53
- $ this ->client ->ephemeralApp ->create ('johndoe ' );
53
+ $ this ->client ->brancherApp ->create ('johndoe ' );
54
54
}
55
55
56
- public function testCancelEphemeralApp ()
56
+ public function testCancelBrancherApp ()
57
57
{
58
58
$ this ->responses ->append (
59
59
new Response (204 , [], null ),
60
60
);
61
61
62
- $ this ->client ->ephemeralApp ->cancel ('johndoe-eph123456 ' );
62
+ $ this ->client ->brancherApp ->cancel ('johndoe-eph123456 ' );
63
63
64
64
$ request = $ this ->responses ->getLastRequest ();
65
65
$ this ->assertEquals ('POST ' , $ request ->getMethod ());
66
66
$ this ->assertEquals ('/v2/app/johndoe-eph123456/cancel/ ' , $ request ->getUri ());
67
67
}
68
68
69
- public function testCancelEphemeralAppRaisesClientExceptions ()
69
+ public function testCancelBrancherAppRaisesClientExceptions ()
70
70
{
71
71
$ badRequestResponse = new Response (400 , [], json_encode ([
72
72
'non_field_errors ' => ['Your request was invalid. ' ]
@@ -75,10 +75,10 @@ public function testCancelEphemeralAppRaisesClientExceptions()
75
75
76
76
$ this ->expectExceptionObject (new HypernodeApiClientException ($ badRequestResponse ));
77
77
78
- $ this ->client ->ephemeralApp ->cancel ('johndoe ' );
78
+ $ this ->client ->brancherApp ->cancel ('johndoe ' );
79
79
}
80
80
81
- public function testCancelEphemeralAppRaisesServerExceptions ()
81
+ public function testCancelBrancherAppRaisesServerExceptions ()
82
82
{
83
83
$ badRequestResponse = new Response (500 , [], json_encode ([
84
84
'non_field_errors ' => ['Something went wrong processing your request. ' ]
@@ -87,6 +87,6 @@ public function testCancelEphemeralAppRaisesServerExceptions()
87
87
88
88
$ this ->expectExceptionObject (new HypernodeApiServerException ($ badRequestResponse ));
89
89
90
- $ this ->client ->ephemeralApp ->cancel ('johndoe ' );
90
+ $ this ->client ->brancherApp ->cancel ('johndoe ' );
91
91
}
92
92
}
0 commit comments