public function testFillable() { $model = new EloquentModelStub(); $model->setFillable(array('name', 'age')); $model->fill(array('name' => 'foo', 'age' => 'bar', 'password' => 'baz')); $this->assertFalse(isset($model->password)); $this->assertEquals('foo', $model->name); $this->assertEquals('bar', $model->age); }
public function testIsWithAnotherConnection() { $firstInstance = new EloquentModelStub(['id' => 1]); $secondInstance = new EloquentModelStub(['id' => 1]); $secondInstance->setConnection('foo'); $result = $firstInstance->is($secondInstance); $this->assertFalse($result); }