AcTestCase::mock PHP Method

mock() protected method

protected mock ( $className )
    protected function mock($className)
    {
        $mock = m::mock($className);
        App::bind($className, function ($app, $parameters = []) use($mock) {
            if (is_array($parameters) && is_array($attributes = array_get($parameters, 0, [])) && respond_to($mock, "fill")) {
                $mock = $this->fillMock($mock, $attributes);
            }
            return $mock;
        });
        return $mock;
    }