Don't rely on getcwd for tests

This commit is contained in:
Daniil Gentili 2019-12-29 13:29:00 +01:00
parent 5bd51f7f81
commit ca074f436e
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -63,7 +63,7 @@ $settings = \json_decode(\getenv('MTPROTO_SETTINGS'), true) ?: [];
* Load MadelineProto * Load MadelineProto
*/ */
echo 'Loading MadelineProto...'.PHP_EOL; echo 'Loading MadelineProto...'.PHP_EOL;
$MadelineProto = new \danog\MadelineProto\API(\getcwd().'/testing.madeline', $settings); $MadelineProto = new \danog\MadelineProto\API(__DIR__.'/../testing.madeline', $settings);
$MadelineProto->async(true); $MadelineProto->async(true);
$MadelineProto->loop(function () use ($MadelineProto) { $MadelineProto->loop(function () use ($MadelineProto) {
yield $MadelineProto->fileGetContents('https://google.com'); yield $MadelineProto->fileGetContents('https://google.com');