-
-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Description
I have had this code in my tests. It is failing with 2.4.0.
$loader = new ContainerLoader(TEMP_DIR);
$className = $loader->load(function (Compiler $compiler) {
$compiler->loadConfig(FileMock::create('', 'neon'));
}, 'container');Nette\InvalidStateException: Unexpected dependency boolean
I think its cause:
// Compiler.php
/**
* Adds new configuration from file.
* @return self
*/
public function loadConfig($file)
{
$loader = new Config\Loader;
$this->addConfig($loader->load($file));
$this->dependencies->add($loader->getDependencies());
return $this;
}// Loader.php
/**
* Reads configuration from file.
* @param string file name
* @param string optional section to load
* @return array
*/
public function load($file, $section = NULL)
{
if (!is_file($file) || !is_readable($file)) {
throw new Nette\FileNotFoundException("File '$file' is missing or is not readable.");
}
$this->dependencies[] = realpath($file);
....
}realpath(FileMock) == bool(FALSE)
It is maybe issue in nette/tester, but I'm not sure if it is issue at all. What do you think?
Metadata
Metadata
Assignees
Labels
No labels