Exemple #1
0
 /**
  * Asserts that AutoloaderIndex::unsetPath() removes an existing class from an
  * index
  *
  * @param AutoloaderIndex $index The tested AutoloaderIndex object
  * @param String          $class A class which exists in $index
  *
  * @dataProvider provideExistingClassesWithPaths
  * @see AutoloaderIndex::unsetPath()
  * @return void
  */
 public function testUnsetPath(AutoloaderIndex $index, $class)
 {
     $this->assertTrue($index->hasPath($class));
     $path = $index->getPath($class);
     $index->unsetPath($class);
     $this->assertFalse($index->hasPath($class));
     if ($index instanceof AutoloaderIndex_SerializedHashtable) {
         $index = $this->_getIndexFromPersistence($index);
         $this->assertFalse($index->hasPath($class));
     }
     $index->setPath($class, $path);
 }