You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
939 B
36 lines
939 B
<?php
|
|
|
|
namespace IFlytek\Xfyun\Speech\Tests\Unit\Speech;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Symfony\Component\Yaml\Yaml;
|
|
|
|
class BaseClientTest extends TestCase
|
|
{
|
|
protected $ability = 'common';
|
|
|
|
protected $config;
|
|
|
|
public function setUp()
|
|
{
|
|
$credentials = [
|
|
'common' => [
|
|
'appId' => getenv('PHPSDK_SPEECH_TTS_APPID'),
|
|
'apiKey' => getenv('PHPSDK_SPEECH_TTS_APIKEY'),
|
|
'apiSecret' => getenv('PHPSDK_SPEECH_TTS_APISECRET')
|
|
],
|
|
'lfasr' => [
|
|
'appId' => getenv('PHPSDK_SPEECH_LFASR_APPID'),
|
|
'secretKey' => getenv('PHPSDK_SPEECH_LFASR_SECRETKEY'),
|
|
'taskId' => getenv('PHPSDK_SPEECH_LFASR_TASKID')
|
|
]
|
|
];
|
|
$this->config = $credentials[$this->ability];
|
|
}
|
|
|
|
public function testSuccessGetEnv()
|
|
{
|
|
$this->assertNotNull($this->config['appId']);
|
|
}
|
|
}
|