public function testMorphOneWhereClausesCanBeRemoved() { $builder = new LMongoMorphResetBuilderStub(); $parent = m::mock('LMongo\\Eloquent\\Model'); $parent->shouldReceive('getKey')->andReturn(1); $relation = new MorphOne($builder, $parent, 'morph_type', 'morph_id'); $relation->where('foo', 'bar'); $wheres = $relation->getAndResetWheres(); $this->assertEquals('Basic', $wheres[0]['type']); $this->assertEquals('foo', $wheres[0]['column']); $this->assertEquals('bar', $wheres[0]['value']); }