Рефакторинг common unit тестов

This commit is contained in:
ErickSkrauch
2016-10-29 03:23:29 +03:00
parent 0e7013d9f5
commit d0548872f1
12 changed files with 88 additions and 103 deletions

View File

@@ -12,12 +12,10 @@ class EmailActivationExpirationBehaviorTest extends TestCase {
use ProtectedCaller;
public function testCalculateTime() {
$this->specify('just use create_time and plus passed time', function() {
$behavior = $this->createBehavior();
$time = time();
$behavior->owner->created_at = $time;
expect($this->callProtected($behavior, 'calculateTime', 10))->equals($time + 10);
});
$behavior = $this->createBehavior();
$time = time();
$behavior->owner->created_at = $time;
$this->assertEquals($time + 10, $this->callProtected($behavior, 'calculateTime', 10));
}
public function testCompareTime() {