Adds a group/class related spec.

@param  string  $message Description message.
@param  Closure $closure A test case closure.

@return Group
434944
public function describe($message, $closure, $timeout = null, $type = 'normal')
    {
        return $this->_block->describe($message, $closure, $timeout, $type);
    }
204081
public static function group(string $prefix, Closure $closure, $middleware = [])
    {
        $prefix = trim($prefix, self::SEPARATOR);

        //Prepend prefixes
        if ($prefix) {
            self::$prefixGroupStack[] = $prefix;
        }

        //Add group middleware
        if ($middleware) {
            self::$middlewareGroupStack[] = $middleware;
        }

        //Call group closure
        $closure();

        //Remove prefix
        if ($prefix) {
            array_pop(self::$prefixGroupStack);
        }

        //Remove current group middleware from the list
        if ($middleware) {
            array_pop(self::$middlewareGroupStack);
        }
    }
61598
protected function adminGroup(Closure $callback)
    {
        $attributes = $this->getAdminAttributes();

        $this->prefix(Arr::get($attributes, 'prefix', 'dashboard'))
             ->name(Arr::get($attributes, 'name', 'admin::'))
             ->namespace($this->adminNamespace)
             ->middleware(Arr::get($attributes, 'middleware', ['web', 'auth', 'admin']))
             ->group($callback);
    }
86660
public function extend($fields, $closure, $message) {

		if(false === is_array($fields)) {
			$fields = [(string) $fields];
		}

		if(false === (gettype($closure) === 'object')) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be a valid callback function, "%s" given', __METHOD__, gettype($closure)), E_USER_ERROR);
		}

		if(false === is_string($message)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($message)), E_USER_ERROR);
		}

		foreach($fields as $field) {
			$this -> addRule(null, $field, null, $closure, $message);
		}
	}
871557
public function withEntryFromClosure(string $key, \Closure $closure): self
    {
        $this->bindings[$key] = $closure;
        return $this;
    }
687429
public function apply($closure)
    {
        foreach ($this as $key => $val) {
            $this->offsetSet($key, $closure($val, $key, $this));
        }
        return $this;
    }
627976
protected function buildSerializableClosure(\Closure $closure)
    {
        switch (true) {
            case class_exists('SuperClosure\\SerializableClosure'):
                return new \SuperClosure\SerializableClosure($closure);

            default:
                return new \Jeremeamia\SuperClosure\SerializableClosure($closure);
        }
    }
889726
public function extendBlock($blockName, Closure $closure)
    {
        $blockName  = ucfirst(strtolower($blockName));
        $methodName = camel_case("block_{$blockName}");

        return $this->bindElementClosure($methodName, $closure);
    }
1182853
public function group($name, \Closure $callback = null)
    {
        $group = $this->getGroup($name);

        if ($callback) {
            $this->startGroup($name);
            call_user_func_array($callback, [$this, $group]);
            $this->stopGroup($name);

            return $group;
        } else {
            $this->startGroup($name);
            $this->events->once('after-add-field', __METHOD__ . $name, function () use ($name) {
                $this->stopGroup($name);
            });

            return $this;
        }
    }
755484
public function each($closure)
    {
        $container = new static();

        $index = -1;
        foreach ($this->items as $key => $item) {
            $container->add($closure($key, $item, $index++), $key);
        }

        return $container;
    }
123583
public function wrap($fieldset, $group, \Closure $handler)
    {
        $bakFieldset = $this->wrap['fieldset'];
        $bakGroup = $this->wrap['group'];

        if ($fieldset !== null) {
            $this->wrap['fieldset'] = $fieldset;
        }

        if ($group !== null) {
            $this->wrap['group'] = $group;
        }

        $handler($this);

        if ($fieldset !== null) {
            $this->wrap['fieldset'] = $bakFieldset;
        }

        if ($group !== null) {
            $this->wrap['group'] = $bakGroup;
        }

        return $this;
    }
305933
public function filter(\Closure $closure)
    {
        $newInstance = new self();
        $newInstance->setArray(array_filter($this->array, $closure));
        return $newInstance;
    }
668740
public function fit($message, $closure = null, $timeout = null)
    {
        return $this->_block->it($message, $closure, $timeout, 'focus');
    }
403933
public function extend($abstract, Closure $closure)
    {
        if (! isset($this->bindings[$abstract])) {
            throw new \InvalidArgumentException("Type {$abstract} is not bound.");
        }

        if (isset($this->instances[$abstract])) {
            $this->instances[$abstract] = $closure($this->instances[$abstract], $this);

            $this->rebound($abstract);
        } else {
            $extender = $this->getExtender($abstract, $closure);

            $this->bind($abstract, $extender, $this->isShared($abstract));
        }
    }
402693
public function add($name, \Closure $closure)
    {
        $test = new Test($name, $closure);
        $this->addTest($test);

        return $test;
    }
573125
public function fullJoin($table, Closure $closure)
    {
        $this->sql->addJoinClause('FULL', $table, $closure);
        return $this;
    }
1084637
public function each(\Closure $closure): self
    {
        // init
        $array = [];

        foreach ($this->getGenerator() as $key => $value) {
            $array[$key] = $closure($value, $key);
        }

        return static::create(
            $array,
            $this->iteratorClass,
            false
        );
    }