minor #13906 [2.3] Changed visibility of setUp() and tearDown to protected (saro0h)
This PR was merged into the 2.3 branch.
Discussion
----------
[2.3] Changed visibility of setUp() and tearDown to protected
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | ~
| License | MIT
| Doc PR | ~
Commits
-------
1e64220
Changed visibility of setUp() and tearDown to protected
This commit is contained in:
commit
f68532cc0d
@ -31,7 +31,7 @@ class RuntimeInstantiatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->instantiator = new RuntimeInstantiator();
|
$this->instantiator = new RuntimeInstantiator();
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class ProxyDumperTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->dumper = new ProxyDumper();
|
$this->dumper = new ProxyDumper();
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class ControllerNameParserTest extends TestCase
|
|||||||
$this->loader->register();
|
$this->loader->register();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
spl_autoload_unregister(array($this->loader, 'loadClass'));
|
spl_autoload_unregister(array($this->loader, 'loadClass'));
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class TranslatorTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->deleteTmpDir();
|
$this->deleteTmpDir();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
$this->deleteTmpDir();
|
$this->deleteTmpDir();
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class TwigLoaderPassTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
private $pass;
|
private $pass;
|
||||||
|
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->builder = $this->getMock(
|
$this->builder = $this->getMock(
|
||||||
'Symfony\Component\DependencyInjection\ContainerBuilder',
|
'Symfony\Component\DependencyInjection\ContainerBuilder',
|
||||||
|
@ -17,7 +17,7 @@ use Symfony\Bundle\TwigBundle\Node\RenderNode;
|
|||||||
|
|
||||||
class LegacyRenderTokenParserTest extends TestCase
|
class LegacyRenderTokenParserTest extends TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
$this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ class TemplateManagerTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
protected $templateManager;
|
protected $templateManager;
|
||||||
|
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class ConfigCacheTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
private $metaFile = null;
|
private $metaFile = null;
|
||||||
|
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->resourceFile = tempnam(sys_get_temp_dir(), '_resource');
|
$this->resourceFile = tempnam(sys_get_temp_dir(), '_resource');
|
||||||
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
|
$this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
|
||||||
@ -32,7 +32,7 @@ class ConfigCacheTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->generateMetaFile();
|
$this->generateMetaFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
$files = array($this->cacheFile, $this->metaFile, $this->resourceFile);
|
$files = array($this->cacheFile, $this->metaFile, $this->resourceFile);
|
||||||
|
|
||||||
|
@ -26,13 +26,13 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected $errorReporting;
|
protected $errorReporting;
|
||||||
|
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->errorReporting = error_reporting(E_ALL | E_STRICT);
|
$this->errorReporting = error_reporting(E_ALL | E_STRICT);
|
||||||
$this->iniSet('display_errors', '1');
|
$this->iniSet('display_errors', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
error_reporting($this->errorReporting);
|
error_reporting($this->errorReporting);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->umask = umask(0);
|
$this->umask = umask(0);
|
||||||
$this->filesystem = new Filesystem();
|
$this->filesystem = new Filesystem();
|
||||||
@ -56,7 +56,7 @@ class FilesystemTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->workspace = realpath($this->workspace);
|
$this->workspace = realpath($this->workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
$this->clean($this->workspace);
|
$this->clean($this->workspace);
|
||||||
umask($this->umask);
|
umask($this->umask);
|
||||||
|
@ -38,7 +38,7 @@ class AutoExpireFlashBagTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->bag->initialize($this->array);
|
$this->bag->initialize($this->array);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
$this->bag = null;
|
$this->bag = null;
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
@ -38,7 +38,7 @@ class FlashBagTest extends \PHPUnit_Framework_TestCase
|
|||||||
$this->bag->initialize($this->array);
|
$this->bag->initialize($this->array);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
$this->bag = null;
|
$this->bag = null;
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
@ -20,7 +20,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
private $path;
|
private $path;
|
||||||
|
|
||||||
public function tearDown()
|
protected function tearDown()
|
||||||
{
|
{
|
||||||
if ($this->path) {
|
if ($this->path) {
|
||||||
// Restore path if it was changed.
|
// Restore path if it was changed.
|
||||||
|
@ -17,7 +17,7 @@ class SimpleProcessTest extends AbstractProcessTest
|
|||||||
{
|
{
|
||||||
private $enabledSigchild = false;
|
private $enabledSigchild = false;
|
||||||
|
|
||||||
public function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
phpinfo(INFO_GENERAL);
|
phpinfo(INFO_GENERAL);
|
||||||
|
Reference in New Issue
Block a user