public function testPreSelect() { $con = Propel::getConnection(Table3Peer::DATABASE_NAME, Propel::CONNECTION_READ); $con->preSelect = 0; Table3Peer::doSelect(new Criteria(), $con); $this->assertEquals($con->preSelect, 1, 'preSelect hook is called in doSelect()'); $con->preSelect = 0; Table3Peer::doSelectOne(new Criteria(), $con); $this->assertEquals($con->preSelect, 1, 'preSelect hook is called in doSelectOne()'); $con->preSelect = 0; Table3Peer::doCount(new Criteria(), $con); $this->assertEquals($con->preSelect, 1, 'preSelect hook is called in doCount()'); $con->preSelect = 0; Table3Peer::doSelectStmt(new Criteria(), $con); $this->assertEquals($con->preSelect, 1, 'preSelect hook is called in doSelectStmt()'); // and for the doSelectJoin and doCountJoin methods, well just believe my word }
public function testModifyTable() { $t = Table3Peer::getTableMap(); $this->assertTrue($t->hasColumn('test'), 'modifyTable hook is called when building the model structure'); }