1
1
<?php
2
2
3
3
4
- use Laravel \Forge \Http ;
5
-
6
4
class ForgeSdkTest extends PHPUnit_Framework_TestCase
7
5
{
8
6
public function tearDown ()
@@ -12,7 +10,7 @@ public function tearDown()
12
10
13
11
public function test_making_basic_requests ()
14
12
{
15
- $ forge = new \Laravel \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
13
+ $ forge = new \Themsaid \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
16
14
17
15
$ http ->shouldReceive ('request ' )->once ()->with ('GET ' , 'recipes ' , [])->andReturn (
18
16
$ response = Mockery::mock ('GuzzleHttp\Psr7\Response ' )
@@ -26,7 +24,7 @@ public function test_making_basic_requests()
26
24
27
25
public function test_handling_validation_errors ()
28
26
{
29
- $ forge = new \Laravel \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
27
+ $ forge = new \Themsaid \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
30
28
31
29
$ http ->shouldReceive ('request ' )->once ()->with ('GET ' , 'recipes ' , [])->andReturn (
32
30
$ response = Mockery::mock ('GuzzleHttp\Psr7\Response ' )
@@ -37,17 +35,17 @@ public function test_handling_validation_errors()
37
35
38
36
try {
39
37
$ forge ->recipes ();
40
- } catch (\Laravel \Forge \Exceptions \ValidationException $ e ) {
38
+ } catch (\Themsaid \Forge \Exceptions \ValidationException $ e ) {
41
39
}
42
40
43
41
$ this ->assertEquals (['name ' => ['The name is required. ' ]], $ e ->errors ());
44
42
}
45
43
46
44
public function test_handling_404_errors ()
47
45
{
48
- $ this ->expectException (\Laravel \Forge \Exceptions \NotFoundException::class);
46
+ $ this ->expectException (\Themsaid \Forge \Exceptions \NotFoundException::class);
49
47
50
- $ forge = new \Laravel \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
48
+ $ forge = new \Themsaid \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
51
49
52
50
$ http ->shouldReceive ('request ' )->once ()->with ('GET ' , 'recipes ' , [])->andReturn (
53
51
$ response = Mockery::mock ('GuzzleHttp\Psr7\Response ' )
@@ -60,7 +58,7 @@ public function test_handling_404_errors()
60
58
61
59
public function test_handling_failed_action_errors ()
62
60
{
63
- $ forge = new \Laravel \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
61
+ $ forge = new \Themsaid \Forge \Forge ('123 ' , $ http = Mockery::mock ('GuzzleHttp\Client ' ));
64
62
65
63
$ http ->shouldReceive ('request ' )->once ()->with ('GET ' , 'recipes ' , [])->andReturn (
66
64
$ response = Mockery::mock ('GuzzleHttp\Psr7\Response ' )
@@ -71,7 +69,7 @@ public function test_handling_failed_action_errors()
71
69
72
70
try {
73
71
$ forge ->recipes ();
74
- } catch (\Laravel \Forge \Exceptions \FailedActionException $ e ) {
72
+ } catch (\Themsaid \Forge \Exceptions \FailedActionException $ e ) {
75
73
}
76
74
77
75
$ this ->assertEquals ('Error! ' , $ e ->getMessage ());
0 commit comments