Skip to content

Commit

Permalink
Fixed visibility of PHPUnit setUp and tearDown methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswallsmith authored and fabpot committed Dec 6, 2010
1 parent 112fb5a commit 3e02eaf
Show file tree
Hide file tree
Showing 52 changed files with 57 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CollectionToChoiceTransformerTest extends \Symfony\Bundle\DoctrineBundle\T
*/
private $em;

public function setUp()
protected function setUp()
{
parent::setUp();
$this->em = $this->createTestEntityManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CollectionToStringTransformerTest extends \Symfony\Bundle\DoctrineBundle\T
*/
private $em;

public function setUp()
protected function setUp()
{
parent::setUp();
$this->em = $this->createTestEntityManager();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EntityToIDTransformerTest extends \Symfony\Bundle\DoctrineBundle\Tests\Tes
*/
private $em;

public function setUp()
protected function setUp()
{
parent::setUp();
$this->em = $this->createTestEntityManager();
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/DoctrineBundle/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
protected function setUp()
{
if (!class_exists('Doctrine\\Common\\Version')) {
$this->markTestSkipped('Doctrine is not available.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
protected function setUp()
{
if (!class_exists('Doctrine\\ODM\\MongoDB\\Version')) {
$this->markTestSkipped('Doctrine MongoDB ODM is not available.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MustacheTest extends TestCase
{
protected $dir;

public function setUp()
protected function setUp()
{
$dir = __DIR__.'/fixtures/';

Expand All @@ -28,7 +28,7 @@ public function setUp()
$filesystem->mirror($dir, $this->dir);
}

public function tearDown()
protected function tearDown()
{
$filesystem = new Filesystem();
$filesystem->remove($this->dir);
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/SwiftmailerBundle/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
protected function setUp()
{
if (!class_exists('Swift_Mailer')) {
$this->markTestSkipped('Swiftmailer is not available.');
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/TwigBundle/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
protected function setUp()
{
if (!class_exists('Twig_Environment')) {
$this->markTestSkipped('Twig is not available.');
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/ZendBundle/Tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
protected function setUp()
{
if (!class_exists('Zend\\Log\\Logger')) {
$this->markTestSkipped('Zend Framework is not available.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class StreamOutputTest extends \PHPUnit_Framework_TestCase
{
protected $stream;

public function setUp()
protected function setUp()
{
$this->stream = fopen('php://memory', 'a', false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ApplicationTesterTest extends \PHPUnit_Framework_TestCase
protected $application;
protected $tester;

public function setUp()
protected function setUp()
{
$this->application = new Application();
$this->application->setAutoExit(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CommandTesterTest extends \PHPUnit_Framework_TestCase
protected $application;
protected $tester;

public function setUp()
protected function setUp()
{
$this->command = new Command('foo');
$this->command->addArgument('command');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TokenizerTest extends \PHPUnit_Framework_TestCase
{
protected $tokenizer;

public function setUp()
protected function setUp()
{
$this->tokenizer = new Tokenizer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ class FileResourceTest extends \PHPUnit_Framework_TestCase
protected $resource;
protected $file;

public function setUp()
protected function setUp()
{
$this->file = sys_get_temp_dir().'/tmp.xml';
touch($this->file);
$this->resource = new FileResource($this->file);
}

public function tearDown()
protected function tearDown()
{
unlink($this->file);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Symfony/Tests/Component/Form/FileFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function setUpBeforeClass()
@session_start();
}

public function tearDown()
protected function tearDown()
{
foreach (self::$tmpFiles as $key => $file) {
@unlink($file);
Expand Down
2 changes: 1 addition & 1 deletion tests/Symfony/Tests/Component/Form/HiddenFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class HiddenFieldTest extends \PHPUnit_Framework_TestCase
{
protected $field;

public function setUp()
protected function setUp()
{
$this->field = new HiddenField('name');
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Symfony/Tests/Component/Form/LocalizedTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class LocalizedTestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
protected function setUp()
{
if (!extension_loaded('intl')) {
$this->markTestSkipped('The "intl" extension is not available');
Expand Down
2 changes: 1 addition & 1 deletion tests/Symfony/Tests/Component/Form/RepeatedFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class RepeatedFieldTest extends \PHPUnit_Framework_TestCase
{
protected $field;

public function setUp()
protected function setUp()
{
$this->field = new RepeatedField(new TestField('name'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class BooleanToStringTransformerTest extends \PHPUnit_Framework_TestCase
{
protected $transformer;

public function setUp()
protected function setUp()
{
$this->transformer = new BooleanToStringTransformer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DateTimeToLocalizedStringTransformerTest extends DateTimeTestCase
protected $dateTime;
protected $dateTimeWithoutSeconds;

public function setUp()
protected function setUp()
{
parent::setUp();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class FileTest extends \PHPUnit_Framework_TestCase
{
protected $file;

public function setUp()
protected function setUp()
{
$this->file = new File(__DIR__.'/Fixtures/test.gif');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CacheTestCase extends \PHPUnit_Framework_TestCase
protected $response;
protected $responses;

public function setUp()
protected function setUp()
{
$this->kernel = null;

Expand All @@ -42,7 +42,7 @@ public function setUp()
$this->clearDirectory(sys_get_temp_dir().'/http_cache');
}

public function tearDown()
protected function tearDown()
{
$this->kernel = null;
$this->cache = null;
Expand Down
4 changes: 2 additions & 2 deletions tests/Symfony/Tests/Component/HttpKernel/Cache/StoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CacheStoreTest extends \PHPUnit_Framework_TestCase
protected $response;
protected $store;

public function setUp()
protected function setUp()
{
$this->request = Request::create('/');
$this->response = new Response('hello world', 200, array());
Expand All @@ -33,7 +33,7 @@ public function setUp()
$this->store = new Store(sys_get_temp_dir().'/http_cache');
}

public function tearDown()
protected function tearDown()
{
$this->store = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AllValidatorTest extends \PHPUnit_Framework_TestCase
protected $walker;
protected $context;

public function setUp()
protected function setUp()
{
$this->walker = $this->getMock('Symfony\Component\Validator\GraphWalker', array(), array(), '', false);
$metadataFactory = $this->getMock('Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AssertFalseValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new AssertFalseValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AssertTrueValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new AssertTrueValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AssertTypeValidatorTest extends \PHPUnit_Framework_TestCase

protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new AssertTypeValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class BlankValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new BlankValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function staticCallback()
return array('foo', 'bar');
}

public function setUp()
protected function setUp()
{
$walker = $this->getMock('Symfony\Component\Validator\GraphWalker', array(), array(), '', false);
$factory = $this->getMock('Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CollectionValidatorTest extends \PHPUnit_Framework_TestCase
protected $walker;
protected $context;

public function setUp()
protected function setUp()
{
$this->walker = $this->getMock('Symfony\Component\Validator\GraphWalker', array(), array(), '', false);
$metadataFactory = $this->getMock('Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DateTimeValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new DateTimeValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DateValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new DateValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class EmailValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new EmailValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class FileValidatorTest extends \PHPUnit_Framework_TestCase
protected $path;
protected $file;

public function setUp()
protected function setUp()
{
$this->validator = new FileValidator();
$this->path = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'FileValidatorTest';
$this->file = fopen($this->path, 'w');
}

public function tearDown()
protected function tearDown()
{
fclose($this->file);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MaxLengthValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new MaxLengthValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MaxValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new MaxValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MinLengthValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new MinLengthValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class MinValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new MinValidator();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class NotBlankValidatorTest extends \PHPUnit_Framework_TestCase
{
protected $validator;

public function setUp()
protected function setUp()
{
$this->validator = new NotBlankValidator();
}
Expand Down
Loading

0 comments on commit 3e02eaf

Please sign in to comment.