public function testHasOneWithJoins() { $x = Employee::first(array('joins' => array('position'))); $this->assertSqlHas('INNER JOIN positions ON(employees.id = positions.employee_id)', Employee::table()->lastSql); }
public function test_has_one_with_joins() { $x = Employee::first(array('joins' => array('position'))); $this->assert_sql_has('INNER JOIN positions ON(employees.id = positions.employee_id)', Employee::table()->last_sql); }
public function test_has_one_with_joins() { $x = Employee::first(array('joins' => array('position'))); $this->assert_true(strpos(Employee::table()->last_sql, 'INNER JOIN `positions` ON(`employees`.id = `positions`.employee_id)') !== false); }