Skip to content

Commit

Permalink
test case
Browse files Browse the repository at this point in the history
  • Loading branch information
steefaan committed Dec 2, 2015
1 parent 6d87e89 commit 092cc52
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -1948,6 +1948,17 @@ public function testSelectOffset()
$this->assertCount(2, $result);
$this->assertEquals(['id' => 2], $result->fetch('assoc'));
$this->assertEquals(['id' => 1], $result->fetch('assoc'));

$query = new Query($this->connection);
$query->select('id')->from('comments')
->limit(1)
->offset(1)
->execute();
$dirty = $this->readAttribute($query, '_dirty');
$this->assertFalse($dirty);
$query->offset(2);
$dirty = $this->readAttribute($query, '_dirty');
$this->assertTrue($dirty);
}

/**
Expand Down

0 comments on commit 092cc52

Please sign in to comment.