Skip to content

Commit 0e2fff7

Browse files
authored
Merge pull request #53 from mrsombre/fix-test-webspace
Drop instanceof checks from tests
2 parents e240f02 + e213e64 commit 0e2fff7

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/PhpHandlerTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
// Copyright 1999-2019. Plesk International GmbH.
33
namespace PleskXTest;
44

5-
use PleskX\Api\Struct\PhpHandler\Info;
6-
75
class PhpHandlerTest extends TestCase
86
{
97
public function testGet()
108
{
119
$handler = static::$_client->phpHandler()->get(null, null);
1210

13-
$this->assertInstanceOf(Info::class, $handler);
11+
$this->assertIsObject($handler);
12+
$this->assertObjectHasAttribute('type', $handler);
1413
}
1514

1615
public function testGetAll()
@@ -21,7 +20,9 @@ public function testGetAll()
2120
$this->assertNotEmpty($handlers);
2221

2322
$handler = current($handlers);
24-
$this->assertInstanceOf(Info::class, $handler);
23+
24+
$this->assertIsObject($handler);
25+
$this->assertObjectHasAttribute('type', $handler);
2526
}
2627

2728
/**

tests/WebspaceTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ public function testGet()
133133
$webspace = static::_createWebspace();
134134
$webspaceInfo = static::$_client->webspace()->get('id', $webspace->id);
135135

136-
$this->assertInstanceOf(\PleskX\Api\Struct\Webspace\GeneralInfo::class, $webspaceInfo);
137136
$this->assertNotEmpty($webspaceInfo->name);
138137
$this->assertEquals(0, $webspaceInfo->realSize);
139138
}

0 commit comments

Comments
 (0)