fixed test break and wrong parameter

This commit is contained in:
Carsten Brandt
2014-06-25 00:48:29 +02:00
parent 0899b8d474
commit b0fb04efd4
2 changed files with 4 additions and 4 deletions

View File

@@ -667,7 +667,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
}
}
$values = $this->getDirtyAttributes($attributes);
$values = $this->getDirtyAttributes($attrs);
if (empty($values)) {
return 0;
}

View File

@@ -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);