Mongolid\Model\AttributesTest::testShouldFillOnlyPermittedAttributes PHP Метод

testShouldFillOnlyPermittedAttributes() публичный Метод

public testShouldFillOnlyPermittedAttributes ( $fillable, $guarded, $input, $expected )
    public function testShouldFillOnlyPermittedAttributes($fillable, $guarded, $input, $expected)
    {
        // Arrange
        $model = new class
        {
            use Attributes;
        };
        $this->setProtected($model, 'fillable', $fillable);
        $this->setProtected($model, 'guarded', $guarded);
        // Assert
        $model->fill($input);
        $this->assertAttributeEquals($expected, 'attributes', $model);
    }