Assert that the given field is disabled.

@param  string  $field
@return $this
427171
public function assertDisabled($field)
    {
        $element = $this->resolver->resolveForField($field);

        PHPUnit::assertFalse(
            $element->isEnabled(),
            "Expected element [{$field}] to be disabled, but it wasn't."
        );

        return $this;
    }
626884
public function set($field, $value) {
        $parser = $this->getParser($field);
        $this->_properties[$field] = $parser->parse($value);
        return $this;
    }
1059260
public function ensure2dIndex($field)
    {
        if (is_array($field)) {
            $keys = array_fill_keys($field, '2d');
        } else {
            $keys = array(
                $field => '2d',
            );
        }

        $this->getMongoCollection()->createIndex($keys);

        return $this;
    }
88565
public function allowField($field)
    {
        if (is_string($field)) {
            $field = explode(',', $field);
        }

        $this->field = $field;

        return $this;
    }
937090
private function assertValidField($field)
    {
        if ( ! isset($this->entityChangeSet[$field])) {
            throw new \InvalidArgumentException(sprintf(
                'Field "%s" is not a valid field of the entity "%s" in PreUpdateEventArgs.',
                $field,
                get_class($this->getEntity())
            ));
        }
    }
1338608
public function addField(Field ...$fields)
    {
        collect($fields)->map(function ($field) {
            $this->group['fields']->put($field->key(), $field->get());
        });

        return $this;
    }
825092
protected function nullableChanged($field = null)
    {
        if (!$field) {
            $function = debug_backtrace()[1]['function'];
            $field    = lcfirst(substr($function, 3));
        }

        $this->nullableChanged[$field] = true;
    }
1024805
public function assertChecked($field, $value = null)
    {
        $element = $this->resolver->resolveForChecking($field, $value);

        PHPUnit::assertTrue(
            $element->isSelected(),
            "Expected checkbox [{$field}] to be checked, but it wasn't."
        );

        return $this;
    }
145317
private function IsFieldLocked($field)
    {
        if (!is_array($this->locked_fields)) {
            return false;
        }
        $locked_tables = array_keys($this->locked_fields);
        $locked_fields = array_values($this->locked_fields);
        $_locked_fields = array();

        foreach ($locked_fields as $locked_field) {
            if (is_array($locked_field)) {
                foreach ($locked_field as $_locked_field) {
                    $_locked_fields[] = $_locked_field;
                }
            } else {
                $_locked_fields[] = $locked_field;
            }
        }

        if (in_array($this->table, $locked_tables) and in_array($field, $_locked_fields)) {
            return true;
        }

        return false;
    }
82180
public function whereInset($field, $value)
    {
        $key = strtr($field, '.', '_');
        $this->_conditions[] = 'FIND_IN_SET(:' . $key . ', ' . '[' . str_replace('.', '].[', $field) . '])>0';
        $this->_bind[$key] = $value;

        return $this;
    }
420101
public function useSoftDelete($field, $condition = null)
    {
        if ($field) {
            $this->options['soft_delete'] = [$field, $condition ?: ['null', '']];
        }
        return $this;
    }
943367
public function hasField(string $field): bool
    {
        if ($this->fields === null) {
            return false;
        }

        return in_array($field, $this->fields);
    }
1203259
public function assertInputValueIsNot($field, $value)
    {
        PHPUnit::assertNotEquals(
            $value, $this->inputValue($field),
            "Value [{$value}] for the [{$field}] input should not equal the actual value."
        );

        return $this;
    }
522773
protected function isExcluded($field)
    {
        return isset($this->options['field']) && $this->options['field'] !== $this->getKey($field);
    }
748095
public function field($field, $except = false)
    {
        if (is_string($field)) {
            $field = array_map('trim', explode(',', $field));
        }
        $projection = [];
        foreach ($field as $key => $val) {
            if (is_numeric($key)) {
                $projection[$val] = $except ? 0 : 1;
            } else {
                $projection[$key] = $val;
            }
        }
        $this->options['projection'] = $projection;
        return $this;
    }
1008678
public function removeField($field)
    {
        if (isset($this->rules[$field])) {
            unset($this->rules[$field]);
            return true;
        }
        return false;
    }
967348
public function assertSelected($field, $value)
    {
        PHPUnit::assertTrue(
            $this->selected($field, $value),
            "Expected value [{$value}] to be selected for [{$field}], but it wasn't."
        );

        return $this;
    }