-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check is_resource before requesting stream_context_get_options
- Loading branch information
1 parent
17784cc
commit d40cf89
Showing
2 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace Tests\Visionline\Crm\WebApi; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Visionline\Crm\WebApi\Connection; | ||
use Visionline\Crm\WebApi\WebApi; | ||
|
||
class FileTest extends TestCase | ||
{ | ||
public function testGetFileWithDefaultStreamContext() | ||
{ | ||
$connection = new Connection('app2.visionline.at', 5000, 'testUser', 'testPassword'); | ||
|
||
$webApi = new WebApi('https://app2.visionline.at:8443/WebApi/WebApi.asmx?WSDL', $connection, [ | ||
'debug' => true, | ||
]); | ||
|
||
$this->expectException(\Exception::class); | ||
$this->expectExceptionMessage('Could not get file extension from https://app2.visionline.at:8443/WebApi/GetFile.ashx?host=app2.visionline.at&port=5000&username=testUser&password=testPassword&id=1'); | ||
|
||
$webApi->getFile(1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters