mirror of
https://github.com/flarum/framework.git
synced 2025-01-31 11:10:44 +08:00
Boot app explicitly to run seeds in time
This commit is contained in:
parent
956050c643
commit
450ca99325
|
@ -43,6 +43,8 @@ class ApiControllerTest extends TestCase
|
|||
['id' => 3, 'title' => 'Custom Discussion Title', 'created_at' => Carbon::now()->toDateTimeString(), 'user_id' => 1, 'first_post_id' => 0, 'comment_count' => 1, 'is_private' => 0],
|
||||
],
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -327,6 +329,8 @@ class ApiControllerTest extends TestCase
|
|||
])
|
||||
);
|
||||
|
||||
echo $response->getBody();
|
||||
|
||||
$payload = json_decode($response->getBody(), true);
|
||||
|
||||
$this->assertArrayHasKey('customSerializer', $payload['data']['attributes']);
|
||||
|
|
|
@ -42,6 +42,8 @@ class ApiSerializerTest extends TestCase
|
|||
['id' => 1, 'discussion_id' => 3, 'created_at' => Carbon::now()->toDateTimeString(), 'user_id' => 2, 'type' => 'discussionRenamed', 'content' => '<t><p>can i haz relationz?</p></t>'],
|
||||
],
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -32,6 +32,8 @@ class ModelTest extends TestCase
|
|||
$this->normalUser(),
|
||||
],
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
protected function prepPostsHierarchy()
|
||||
|
@ -47,6 +49,8 @@ class ModelTest extends TestCase
|
|||
['id' => 1, 'discussion_id' => 1, 'created_at' => Carbon::now()->toDateTimeString(), 'user_id' => 2, 'type' => 'discussionRenamed', 'content' => '<t><p>can i haz relationz?</p></t>'],
|
||||
],
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -161,12 +165,12 @@ class ModelTest extends TestCase
|
|||
})
|
||||
);
|
||||
|
||||
$this->prepDB();
|
||||
$this->prepareDatabase([
|
||||
'discussions' => [
|
||||
['id' => 1, 'title' => __CLASS__, 'created_at' => Carbon::now()->toDateTimeString(), 'user_id' => 1, 'first_post_id' => 1, 'comment_count' => 1]
|
||||
]
|
||||
]);
|
||||
$this->prepDB();
|
||||
|
||||
$user = User::find(1);
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ class ModelVisibilityTest extends TestCase
|
|||
$this->normalUser(),
|
||||
]
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,6 +41,8 @@ class PolicyTest extends TestCase
|
|||
['id' => 1, 'discussion_id' => 1, 'created_at' => Carbon::now()->toDateTimeString(), 'user_id' => 1, 'type' => 'comment', 'content' => '<t><p>a normal reply - too-obscure</p></t>'],
|
||||
]
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -30,6 +30,8 @@ class UserTest extends TestCase
|
|||
['key' => 'display_name_driver', 'value' => 'custom'],
|
||||
]
|
||||
]);
|
||||
|
||||
$this->app();
|
||||
}
|
||||
|
||||
protected function registerTestPreference()
|
||||
|
|
Loading…
Reference in New Issue
Block a user