mirror of
https://github.com/flarum/core.git
synced 2025-08-01 14:10:37 +02:00
Boot app explicitly to run seeds in time
This commit is contained in:
committed by
Alexander Skvortsov
parent
cacc8b4945
commit
008ec95505
@@ -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],
|
['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);
|
$payload = json_decode($response->getBody(), true);
|
||||||
|
|
||||||
$this->assertArrayHasKey('customSerializer', $payload['data']['attributes']);
|
$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>'],
|
['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->normalUser(),
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->app();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function prepPostsHierarchy()
|
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>'],
|
['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([
|
$this->prepareDatabase([
|
||||||
'discussions' => [
|
'discussions' => [
|
||||||
['id' => 1, 'title' => __CLASS__, 'created_at' => Carbon::now()->toDateTimeString(), 'user_id' => 1, 'first_post_id' => 1, 'comment_count' => 1]
|
['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);
|
$user = User::find(1);
|
||||||
|
|
||||||
|
@@ -39,6 +39,8 @@ class ModelVisibilityTest extends TestCase
|
|||||||
$this->normalUser(),
|
$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>'],
|
['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'],
|
['key' => 'display_name_driver', 'value' => 'custom'],
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->app();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function registerTestPreference()
|
protected function registerTestPreference()
|
||||||
|
Reference in New Issue
Block a user