Skip to content

Commit 164f3a0

Browse files
Fixed static method calls in tests
1 parent 46bf301 commit 164f3a0

9 files changed

+23
-23
lines changed

tests/ClientTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function testCreateClient()
2828
{
2929
$client = new Client();
3030

31-
$this->assertInstanceOf(Client::class, $client);
32-
$this->assertInstanceOf(HttpMethodsClient::class, $client->getHttpClient());
31+
self::assertInstanceOf(Client::class, $client);
32+
self::assertInstanceOf(HttpMethodsClient::class, $client->getHttpClient());
3333
}
3434

3535
public function testShowRepo()
@@ -41,8 +41,8 @@ public function testShowRepo()
4141
->workspaces('atlassian')
4242
->show('stash-example-plugin');
4343

44-
$this->assertIsArray($response);
45-
$this->assertTrue(isset($response['uuid']));
46-
$this->assertSame('{7dd600e6-0d9c-4801-b967-cb4cc17359ff}', $response['uuid']);
44+
self::assertIsArray($response);
45+
self::assertTrue(isset($response['uuid']));
46+
self::assertSame('{7dd600e6-0d9c-4801-b967-cb4cc17359ff}', $response['uuid']);
4747
}
4848
}

tests/ProjectsTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public function testProjectList()
3939
->projects()
4040
->list();
4141

42-
$this->assertIsArray($response);
43-
$this->assertCount(9, $response['values']);
42+
self::assertIsArray($response);
43+
self::assertCount(9, $response['values']);
4444
}
4545

4646
public function testProjectShow()
@@ -54,8 +54,8 @@ public function testProjectShow()
5454
->projects()
5555
->show('Atlassian1');
5656

57-
$this->assertIsArray($response);
58-
$this->assertCount(11, $response);
57+
self::assertIsArray($response);
58+
self::assertCount(11, $response);
5959
}
6060

6161
public function testProjectCreate()
@@ -81,8 +81,8 @@ public function testProjectCreate()
8181
->projects()
8282
->create($params);
8383

84-
$this->assertIsArray($response);
85-
$this->assertCount(11, $response);
84+
self::assertIsArray($response);
85+
self::assertCount(11, $response);
8686
}
8787

8888
public function testProjectUpdate()
@@ -108,8 +108,8 @@ public function testProjectUpdate()
108108
->projects()
109109
->update('Atlassian1', $params);
110110

111-
$this->assertIsArray($response);
112-
$this->assertCount(11, $response);
111+
self::assertIsArray($response);
112+
self::assertCount(11, $response);
113113
}
114114

115115
public function testProjectRemove()
@@ -123,7 +123,7 @@ public function testProjectRemove()
123123
->projects()
124124
->remove('Atlassian1');
125125

126-
$this->assertIsArray($response);
127-
$this->assertCount(0, $response);
126+
self::assertIsArray($response);
127+
self::assertCount(0, $response);
128128
}
129129
}

tests/Response/ProjectsCreateResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class ProjectsCreateResponse
2727
/**
2828
* @return \Psr\Http\Message\ResponseInterface
2929
*/
30-
public function create()
30+
public static function create()
3131
{
3232
$body = Resource::get('projects-create-success.json');
3333

tests/Response/ProjectsListResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class ProjectsListResponse
2727
/**
2828
* @return \Psr\Http\Message\ResponseInterface
2929
*/
30-
public function create()
30+
public static function create()
3131
{
3232
$body = Resource::get('projects-list-success.json');
3333

tests/Response/ProjectsRemoveResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class ProjectsRemoveResponse
2727
/**
2828
* @return \Psr\Http\Message\ResponseInterface
2929
*/
30-
public function create()
30+
public static function create()
3131
{
3232
$body = Resource::get('projects-remove-success.json');
3333

tests/Response/ProjectsShowResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class ProjectsShowResponse
2727
/**
2828
* @return \Psr\Http\Message\ResponseInterface
2929
*/
30-
public function create()
30+
public static function create()
3131
{
3232
$body = Resource::get('projects-show-success.json');
3333

tests/Response/ProjectsUpdateResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class ProjectsUpdateResponse
2727
/**
2828
* @return \Psr\Http\Message\ResponseInterface
2929
*/
30-
public function create()
30+
public static function create()
3131
{
3232
$body = Resource::get('projects-update-success.json');
3333

tests/Response/WorkspacesShowResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class WorkspacesShowResponse
2727
/**
2828
* @return \Psr\Http\Message\ResponseInterface
2929
*/
30-
public function create()
30+
public static function create()
3131
{
3232
$body = Resource::get('workspaces-show-success.json');
3333

tests/WorkspacesTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testWorkspaceShow()
3232

3333
$response = $client->workspaces('my-workspace')->show();
3434

35-
$this->assertIsArray($response);
36-
$this->assertCount(7, $response);
35+
self::assertIsArray($response);
36+
self::assertCount(7, $response);
3737
}
3838
}

0 commit comments

Comments
 (0)