public function testRefreshFactoryClassDoesNotGenerateIfAutoGenerateDisabled() { $manager = new FactoryManagerImpl($this->context, $this->registry, $this->fakeWriter, $this->servers); // Older than config file -> would normally be generated touch($this->rootDir . '/MyFactory.php'); sleep(1); touch($this->rootPackageFile->getPath()); $this->fakeWriter->expects($this->never())->method('writeClass'); $this->context->getConfig()->set(Config::FACTORY_AUTO_GENERATE, false); $manager->refreshFactoryClass(); }