Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Modules\Blog\Tests; |
||
35 | public function createBlogPost() |
||
36 | { |
||
37 | $faker = Factory::create(); |
||
38 | |||
39 | $title = implode(' ', $faker->words(3)); |
||
40 | $slug = Str::slug($title); |
||
41 | |||
42 | $data = [ |
||
43 | 'en' => [ |
||
44 | 'title' => $title, |
||
45 | 'slug' => $slug, |
||
46 | 'content' => $faker->paragraph(), |
||
47 | ], |
||
48 | 'fr' => [ |
||
49 | 'title' => $title, |
||
50 | 'slug' => $slug, |
||
51 | 'content' => $faker->paragraph(), |
||
52 | ], |
||
53 | 'category_id' => 1, |
||
54 | ]; |
||
55 | |||
56 | return $this->post->create($data); |
||
57 | } |
||
58 | |||
83 |