TYPO3 CMS  TYPO3_6-2
UnitTestCase.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Core\Tests;
3 
26 abstract class UnitTestCase extends BaseTestCase {
27 
33  protected $backupGlobalsBlacklist = array('TYPO3_LOADED_EXT');
34 
46  protected function tearDown() {
47  $reflection = new \ReflectionObject($this);
48  foreach ($reflection->getProperties() as $property) {
49  $declaringClass = $property->getDeclaringClass()->getName();
50  if (
51  !$property->isStatic()
52  && $declaringClass !== 'TYPO3\CMS\Core\Tests\UnitTestCase'
53  && $declaringClass !== 'TYPO3\CMS\Core\Tests\BaseTestCase'
54  && strpos($property->getDeclaringClass()->getName(), 'PHPUnit_') !== 0
55  ) {
56  $propertyName = $property->getName();
57  unset($this->$propertyName);
58  }
59  }
60  unset($reflection);
61  }
62 }