PackageTest.php
1.05 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
36
37
38
39
40
41
42
<?php
namespace Aura\Intl;
/**
* Test class for Package.
* Generated by PHPUnit on 2012-10-27 at 22:46:01.
*/
class PackageTest extends \PHPUnit_Framework_TestCase
{
protected $package;
protected function setUp()
{
parent::setUp();
$factory = new PackageFactory;
$this->package = $factory->newInstance([
'fallback' => 'Vendor.Fallback',
'formatter' => 'intl',
'messages' => [
'ERR_NO_SUCH_OPTION' => "The option {option} is not recognized.",
],
]);
}
public function testGet()
{
$expect = 'Vendor.Fallback';
$actual = $this->package->getFallback();
$this->assertSame($expect, $actual);
$expect = 'intl';
$actual = $this->package->getFormatter();
$this->assertSame($expect, $actual);
$expect = [
'ERR_NO_SUCH_OPTION' => "The option {option} is not recognized.",
];
$actual = $this->package->getMessages();
$this->assertSame($expect, $actual);
}
}