/** * 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); }
/** * Runs one iteration of the benchmark * * @param AutoloaderIndex $index The AutoloaderIndex instance * @param array $classSet The list of classes to fetch * * @return void */ protected function runBenchmark(AutoloaderIndex $index, array $classSet) { foreach ($classSet as $classNumber) { $index->getPath($this->_getIndexedClassName($classNumber)); } }