/** * @group DataModel * @group DataModelWhereRaw * @covers FOF30\Model\DataModel::whereRaw */ public function testWhereRaw() { $config = array('idFieldName' => 'foftest_bare_id', 'tableName' => '#__foftest_bares'); $model = new DataModelStub(static::$container, $config); $result = $model->whereRaw('foo = bar'); $where = ReflectionHelper::getValue($model, 'whereClauses'); $this->assertEquals(array('foo = bar'), $where, 'DataModel::whereRaw failed to save custom where clause'); $this->assertInstanceOf('\\FOF30\\Model\\DataModel', $result, 'DataModel::whereRaw should return an instance of itself'); }