-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathProsodyTest.php
More file actions
35 lines (29 loc) · 1.1 KB
/
ProsodyTest.php
File metadata and controls
35 lines (29 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Copyright (c) Zandura GmbH - all rights reserved.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Written by Benjamin Ansbach <benjamin.ansbach@zandura.net>, 2016
*/
declare(strict_types = 1);
namespace Techworker\Ssml\Tests\Element;
use Techworker\Ssml\Element\Emphasis;
use Techworker\Ssml\Element\Lang;
use Techworker\Ssml\Element\Prosody;
use Techworker\Ssml\Tests\TestCase;
class ProsodyTest extends TestCase
{
public function testToDOM()
{
$element = Prosody::factory('x-slow');
self::assertEquals('<prosody rate="x-slow"/>', (string)$element);
$element = Prosody::factory(null, 'x-low');
self::assertEquals('<prosody pitch="x-low"/>', (string)$element);
$element = Prosody::factory(null, null, 'silent');
self::assertEquals('<prosody volume="silent"/>', (string)$element);
$element = Prosody::factory('x-slow', 'x-low', 'silent');
self::assertEquals('<prosody rate="x-slow" pitch="x-low" volume="silent"/>', (string)$element);
}
}