コード例 #1
0
 public function testHasOneWithJoins()
 {
     $x = Employee::first(array('joins' => array('position')));
     $this->assertSqlHas('INNER JOIN positions ON(employees.id = positions.employee_id)', Employee::table()->lastSql);
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
 }