File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 7
7
8
8
class ProviderTest extends TestCase
9
9
{
10
+ public function testAmazonSynthesizesExpectedContent ()
11
+ {
12
+ $ provider = Provider::instance ('amazon ' , [
13
+ 'key ' => $ this ->config ['amazon_api_key ' ],
14
+ 'secret ' => $ this ->config ['amazon_api_secret ' ],
15
+ ]);
16
+ $ content = $ provider ->synthesize ($ this ->getDataFileContents ('text.txt ' ));
17
+
18
+ // Pre-signed URL is always unique. Parse params to test a few of them.
19
+ parse_str (
20
+ parse_url ($ content ->audio [0 ], PHP_URL_QUERY ),
21
+ $ params
22
+ );
23
+
24
+ $ this ->assertInstanceOf (Content::class, $ content );
25
+ $ this ->assertContains ($ this ->config ['amazon_api_key ' ], $ params ['X-Amz-Credential ' ]);
26
+ $ this ->assertEquals ($ this ->getDataFileContents ('text.txt ' ), $ params ['Text ' ]);
27
+ }
28
+
10
29
public function testGoogleSynthesizesExpectedContent ()
11
30
{
12
31
$ provider = Provider::instance ('google ' );
You can’t perform that action at this time.
0 commit comments