Commit b0fb04ef by Carsten Brandt

fixed test break and wrong parameter

parent 0899b8d4
...@@ -667,7 +667,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface ...@@ -667,7 +667,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
} }
} }
$values = $this->getDirtyAttributes($attributes); $values = $this->getDirtyAttributes($attrs);
if (empty($values)) { if (empty($values)) {
return 0; return 0;
} }
......
...@@ -867,7 +867,7 @@ trait ActiveRecordTestTrait ...@@ -867,7 +867,7 @@ trait ActiveRecordTestTrait
/* @var $customerClass \yii\db\ActiveRecordInterface */ /* @var $customerClass \yii\db\ActiveRecordInterface */
$customerClass = $this->getCustomerClass(); $customerClass = $this->getCustomerClass();
/* @var $this TestCase|ActiveRecordTestTrait */ /* @var $this TestCase|ActiveRecordTestTrait */
// save /* @var $customer Customer */
$customer = $customerClass::findOne(2); $customer = $customerClass::findOne(2);
$this->assertTrue($customer instanceof $customerClass); $this->assertTrue($customer instanceof $customerClass);
$this->assertEquals('user2', $customer->name); $this->assertEquals('user2', $customer->name);
...@@ -879,8 +879,8 @@ trait ActiveRecordTestTrait ...@@ -879,8 +879,8 @@ trait ActiveRecordTestTrait
$this->afterSave(); $this->afterSave();
$this->assertEquals('user2x', $customer->name); $this->assertEquals('user2x', $customer->name);
$this->assertFalse($customer->isNewRecord); $this->assertFalse($customer->isNewRecord);
$this->assertFalse(static::$afterSaveNewRecord); $this->assertNull(static::$afterSaveNewRecord);
$this->assertFalse(static::$afterSaveInsert); $this->assertNull(static::$afterSaveInsert);
$customer2 = $customerClass::findOne(2); $customer2 = $customerClass::findOne(2);
$this->assertEquals('user2x', $customer2->name); $this->assertEquals('user2x', $customer2->name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment