示例#1
0
 public function afterSave($insert)
 {
     ActiveRecordTest::$afterSaveInsert = $insert;
     ActiveRecordTest::$afterSaveNewRecord = $this->isNewRecord;
     parent::afterSave($insert);
 }
示例#2
0
 public function afterSave($insert, $changedAttributes)
 {
     ActiveRecordTest::$afterSaveInsert = $insert;
     ActiveRecordTest::$afterSaveNewRecord = $this->isNewRecord;
     parent::afterSave($insert, $changedAttributes);
 }
 public function testFindEmptyInCondition()
 {
     parent::testFindEmptyInCondition();
     $products = Product::find()->where(['(!int!)' => [123]])->all();
     $this->assertEquals(1, count($products));
     $products = Product::find()->where(['(!int!)' => []])->all();
     $this->assertEquals(0, count($products));
     $products = Product::find()->where(['IN', '(!int!)', [123]])->all();
     $this->assertEquals(1, count($products));
     $products = Product::find()->where(['IN', '(!int!)', []])->all();
     $this->assertEquals(0, count($products));
 }
 protected function setUp()
 {
     static::$params = (require __DIR__ . '/data/config.php');
     parent::setUp();
 }