1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* (c) Christian Gripp <[email protected]> |
5
|
|
|
* |
6
|
|
|
* For the full copyright and license information, please view the LICENSE |
7
|
|
|
* file that was distributed with this source code. |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace Core23\ShariffBundle\Tests\DependencyInjection; |
11
|
|
|
|
12
|
|
|
use Core23\ShariffBundle\DependencyInjection\Core23ShariffExtension; |
13
|
|
|
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; |
14
|
|
|
|
15
|
|
|
class Core23ShariffExtensionTest extends AbstractExtensionTestCase |
16
|
|
|
{ |
17
|
|
|
public function testLoadDefault() |
18
|
|
|
{ |
19
|
|
|
$this->load(); |
20
|
|
|
|
21
|
|
|
$this->assertContainerBuilderHasParameter('core23_shariff.options', array( |
22
|
|
|
'domains' => array(), |
23
|
|
|
'services' => array('GooglePlus', 'LinkedIn', 'Reddit', 'StumbleUpon', 'Flattr', 'Pinterest', 'Xing', 'AddThis'), |
24
|
|
|
)); |
25
|
|
|
} |
26
|
|
|
|
27
|
|
|
public function testLoadFacebook() |
28
|
|
|
{ |
29
|
|
|
$this->load(array( |
30
|
|
|
'services' => array( |
31
|
|
|
'facebook' => array( |
32
|
|
|
'app_id' => 'foo_id', |
33
|
|
|
'secret' => 'app_secret', |
34
|
|
|
), |
35
|
|
|
), |
36
|
|
|
)); |
37
|
|
|
|
38
|
|
|
$this->assertContainerBuilderHasParameter('core23_shariff.options', array( |
39
|
|
|
'domains' => array(), |
40
|
|
|
'services' => array('GooglePlus', 'Facebook', 'LinkedIn', 'Reddit', 'StumbleUpon', 'Flattr', 'Pinterest', 'Xing', 'AddThis'), |
41
|
|
|
'Facebook' => array( |
42
|
|
|
'app_id' => 'foo_id', |
43
|
|
|
'secret' => 'app_secret', |
44
|
|
|
), |
45
|
|
|
)); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
protected function getContainerExtensions() |
49
|
|
|
{ |
50
|
|
|
return array( |
51
|
|
|
new Core23ShariffExtension(), |
52
|
|
|
); |
53
|
|
|
} |
54
|
|
|
} |
55
|
|
|
|