mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-13 20:59:12 +08:00
fixed test break and wrong parameter
This commit is contained in:
@@ -667,7 +667,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
|
||||
}
|
||||
}
|
||||
|
||||
$values = $this->getDirtyAttributes($attributes);
|
||||
$values = $this->getDirtyAttributes($attrs);
|
||||
if (empty($values)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -867,7 +867,7 @@ trait ActiveRecordTestTrait
|
||||
/* @var $customerClass \yii\db\ActiveRecordInterface */
|
||||
$customerClass = $this->getCustomerClass();
|
||||
/* @var $this TestCase|ActiveRecordTestTrait */
|
||||
// save
|
||||
/* @var $customer Customer */
|
||||
$customer = $customerClass::findOne(2);
|
||||
$this->assertTrue($customer instanceof $customerClass);
|
||||
$this->assertEquals('user2', $customer->name);
|
||||
@@ -879,8 +879,8 @@ trait ActiveRecordTestTrait
|
||||
$this->afterSave();
|
||||
$this->assertEquals('user2x', $customer->name);
|
||||
$this->assertFalse($customer->isNewRecord);
|
||||
$this->assertFalse(static::$afterSaveNewRecord);
|
||||
$this->assertFalse(static::$afterSaveInsert);
|
||||
$this->assertNull(static::$afterSaveNewRecord);
|
||||
$this->assertNull(static::$afterSaveInsert);
|
||||
$customer2 = $customerClass::findOne(2);
|
||||
$this->assertEquals('user2x', $customer2->name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user