Skip to content

Commit 142e53c

Browse files
committed
Added PHPdoc
1 parent 3148b85 commit 142e53c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

src/Symfony/Cmf/Component/Testing/Functional/BaseTestCase.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,44 @@
44

55
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
66

7+
/**
8+
* The base class for Functional and Web tests.
9+
*
10+
* @author Daniel Leech <[email protected]>
11+
* @author Wouter J <[email protected]>
12+
*/
713
abstract class BaseTestCase extends WebTestCase
814
{
15+
/**
16+
* Use this property to save the DbManager.
17+
*/
918
protected $db;
19+
1020
protected $dbManagers = array();
1121
protected $settings = array();
1222
protected $containers = array();
1323

24+
/**
25+
* Configure the testcase.
26+
*
27+
* Currently, this is only used for creating a new kernel. This accepts
28+
* 2 settings:
29+
*
30+
* * environment - The environment to use (defaults to 'phpcr')
31+
* * debug - If debug should be enabled/disabled (defaults to true)
32+
*
33+
* @param array $options
34+
*/
1435
protected function configure(array $options)
1536
{
1637
$this->settings = $options;
1738
}
1839

40+
/**
41+
* Gets the container.
42+
*
43+
* @return \Symfony\Component\DependencyInjection\Container
44+
*/
1945
public function getContainer()
2046
{
2147
$hash = md5(serialize($this->settings));
@@ -28,11 +54,23 @@ public function getContainer()
2854
return $this->containers[$hash];
2955
}
3056

57+
/**
58+
* Gets the DbManager.
59+
*
60+
* @see self::getDbManager
61+
*/
3162
public function db($type)
3263
{
3364
return $this->getDbManager($type);
3465
}
3566

67+
/**
68+
* Gets the DbManager.
69+
*
70+
* @param string $type The Db type
71+
*
72+
* @return object
73+
*/
3674
public function getDbManager($type)
3775
{
3876
if (isset($this->dbManagers[$type])) {
@@ -60,6 +98,8 @@ public function getDbManager($type)
6098

6199
/**
62100
* {@inheritDoc}
101+
*
102+
* This is overriden to set the default environment to 'phpcr'
63103
*/
64104
protected static function createKernel(array $options = array())
65105
{

0 commit comments

Comments
 (0)