Browse Source

Updated TimestampBehaviorTest to test the callable in array format as value

tags/2.0.7
SilverFire - Dmitry Naumenko 9 years ago
parent
commit
624be05be0
  1. 6
      tests/framework/behaviors/TimestampBehaviorTest.php

6
tests/framework/behaviors/TimestampBehaviorTest.php

@ -107,6 +107,7 @@ class TimestampBehaviorTest extends TestCase
[new Expression("strftime('%Y')"), date('Y')],
['2015-10-20', '2015-10-20'],
[time(), time()],
[[$this, 'arrayCallable'], '2015-10-20'],
];
}
@ -133,6 +134,11 @@ class TimestampBehaviorTest extends TestCase
$this->assertEquals($expected, $model->updated_at);
}
public function arrayCallable($event)
{
return '2015-10-20';
}
/**
* @depends testNewRecord
*/

Loading…
Cancel
Save