コード例 #1
0
ファイル: Customer.php プロジェクト: sciurodont/yii2
 public function afterSave($insert)
 {
     ActiveRecordTest::$afterSaveInsert = $insert;
     ActiveRecordTest::$afterSaveNewRecord = $this->isNewRecord;
     parent::afterSave($insert);
 }
コード例 #2
0
ファイル: Customer.php プロジェクト: noname007/yii2-1
 public function afterSave($insert, $changedAttributes)
 {
     ActiveRecordTest::$afterSaveInsert = $insert;
     ActiveRecordTest::$afterSaveNewRecord = $this->isNewRecord;
     parent::afterSave($insert, $changedAttributes);
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 protected function setUp()
 {
     static::$params = (require __DIR__ . '/data/config.php');
     parent::setUp();
 }