Skip to content

Commit f451101

Browse files
committed
update tests
1 parent 3264ae5 commit f451101

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/ForgeSdkTest.php

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22

33

4-
use Laravel\Forge\Http;
5-
64
class ForgeSdkTest extends PHPUnit_Framework_TestCase
75
{
86
public function tearDown()
@@ -12,7 +10,7 @@ public function tearDown()
1210

1311
public function test_making_basic_requests()
1412
{
15-
$forge = new \Laravel\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
13+
$forge = new \Themsaid\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
1614

1715
$http->shouldReceive('request')->once()->with('GET', 'recipes', [])->andReturn(
1816
$response = Mockery::mock('GuzzleHttp\Psr7\Response')
@@ -26,7 +24,7 @@ public function test_making_basic_requests()
2624

2725
public function test_handling_validation_errors()
2826
{
29-
$forge = new \Laravel\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
27+
$forge = new \Themsaid\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
3028

3129
$http->shouldReceive('request')->once()->with('GET', 'recipes', [])->andReturn(
3230
$response = Mockery::mock('GuzzleHttp\Psr7\Response')
@@ -37,17 +35,17 @@ public function test_handling_validation_errors()
3735

3836
try {
3937
$forge->recipes();
40-
} catch (\Laravel\Forge\Exceptions\ValidationException $e) {
38+
} catch (\Themsaid\Forge\Exceptions\ValidationException $e) {
4139
}
4240

4341
$this->assertEquals(['name' => ['The name is required.']], $e->errors());
4442
}
4543

4644
public function test_handling_404_errors()
4745
{
48-
$this->expectException(\Laravel\Forge\Exceptions\NotFoundException::class);
46+
$this->expectException(\Themsaid\Forge\Exceptions\NotFoundException::class);
4947

50-
$forge = new \Laravel\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
48+
$forge = new \Themsaid\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
5149

5250
$http->shouldReceive('request')->once()->with('GET', 'recipes', [])->andReturn(
5351
$response = Mockery::mock('GuzzleHttp\Psr7\Response')
@@ -60,7 +58,7 @@ public function test_handling_404_errors()
6058

6159
public function test_handling_failed_action_errors()
6260
{
63-
$forge = new \Laravel\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
61+
$forge = new \Themsaid\Forge\Forge('123', $http = Mockery::mock('GuzzleHttp\Client'));
6462

6563
$http->shouldReceive('request')->once()->with('GET', 'recipes', [])->andReturn(
6664
$response = Mockery::mock('GuzzleHttp\Psr7\Response')
@@ -71,7 +69,7 @@ public function test_handling_failed_action_errors()
7169

7270
try {
7371
$forge->recipes();
74-
} catch (\Laravel\Forge\Exceptions\FailedActionException $e) {
72+
} catch (\Themsaid\Forge\Exceptions\FailedActionException $e) {
7573
}
7674

7775
$this->assertEquals('Error!', $e->getMessage());

0 commit comments

Comments
 (0)