function testThrowsSyntaxErrorOnLimitedUpdate() { $users = new Table("users"); try { $this->pdo->exec($users->update()->set(array('created_at' => new DateTime()))->take(2)->toSql()); $this->fail(); } catch (\PDOException $e) { // Expect a Syntax Error $this->assertEquals(1, $e->errorInfo[1]); } }
function testMin() { $users = new Table("users"); $min = $this->pdo->query($users->project($users->age->min()))->fetchColumn(); $this->assertEquals(23, $min); }
/** * Returns the Table's name * * @param Table $table * @return string */ protected function visitSirelTable(Table $table) { return $table->getName(); }