lithium\test\fixtures\adapter\Connection::_instantiate()

protected method

Instantiate a fixture

Parameters

  • array $name

    The fixture name to instantiate

Returns

boolean

Returns true on success

Source

	protected function _instantiate($name) {
		if (isset($this->_fixtures[$name])) {
			$options = [
				'connection' => $this->_connection,
				'alters' => $this->_config['alters']
			];
			$this->_loaded[$name] = new $this->_fixtures[$name]($options);
			return true;
		} else {
			throw new UnexpectedValueException("Undefined fixture named: `{$name}`.");
		}
	}