8000 [Classloader] Refactored ApcUniversalClassLoader to use setUp() to de… · xamba/symfony@29802fa · GitHub
[go: up one dir, main page]

Skip to content

Commit 29802fa

Browse files
committed
[Classloader] Refactored ApcUniversalClassLoader to use setUp() to detect APC
1 parent 1f3a968 commit 29802fa

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

tests/Symfony/Tests/Component/ClassLoader/ApcUniversalClassLoaderTest.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class ApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase
1717
{
1818

19-
protected function skipIfAPCExtensionIsNotLoadedOrEnabled()
19+
protected function setUp()
2020
{
2121
if (!extension_loaded('apc')) {
2222
$this->markTestSkipped('The apc extension is not available.');
@@ -29,8 +29,6 @@ protected function skipIfAPCExtensionIsNotLoadedOrEnabled()
2929

3030
public function testConstructor()
3131
{
32-
$this->skipIfAPCExtensionIsNotLoadedOrEnabled();
33-
3432
$loader = new ApcUniversalClassLoader('test.prefix.');
3533
$loader->registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
3634

@@ -42,8 +40,6 @@ public function testConstructor()
4240
*/
4341
public function testLoadClass($className, $testClassName, $message)
4442
{
45-
$this->skipIfAPCExtensionIsNotLoadedOrEnabled();
46-
4743
$loader = new ApcUniversalClassLoader('test.prefix.');
4844
$loader->registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
4945
$loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
@@ -66,8 +62,6 @@ public function getLoadClassTests()
6662
*/
6763
public function testLoadClassFromFallback($className, $testClassName, $message)
6864
{
69-
$this->skipIfAPCExtensionIsNotLoadedOrEnabled();
70-
7165
$loader = new ApcUniversalClassLoader('test.prefix.');
7266
$loader->registerNamespace('Namespaced', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
7367
$loader->registerPrefix('Pearlike_', __DIR__.DIRECTORY_SEPARATOR.'Fixtures');
@@ -92,8 +86,6 @@ public function getLoadClassFromFallbackTests()
9286
*/
9387
public function testLoadClassNamespaceCollision($namespaces, $className, $message)
9488
{
95-
$this->skipIfAPCExtensionIsNotLoadedOrEnabled();
96-
9789
$loader = new ApcUniversalClassLoader('test.prefix.');
9890
$loader->registerNamespaces($namespaces);
9991

@@ -144,8 +136,6 @@ public function getLoadClassNamespaceCollisionTests()
144136
*/
145137
public function testLoadClassPrefixCollision($prefixes, $className, $message)
146138
{
147-
$this->skipIfAPCExtensionIsNotLoadedOrEnabled();
148-
149139
$loader = new ApcUniversalClassLoader('test.prefix.');
150140
$loader->registerPrefixes($prefixes);
151141

0 commit comments

Comments
 (0)
0