| @@ 102-115 (lines=14) @@ | ||
| 99 | $this->assertEquals(require(__DIR__ . '/data/test-find-posts.php'), $data); |
|
| 100 | } |
|
| 101 | ||
| 102 | public function testCreatePost() |
|
| 103 | { |
|
| 104 | $post = new Post([ |
|
| 105 | 'title' => 'New post title', |
|
| 106 | 'body' => 'New post body', |
|
| 107 | ]); |
|
| 108 | ||
| 109 | $this->assertTrue($post->save()); |
|
| 110 | ||
| 111 | $dataSet = $this->getConnection()->createDataSet(['post', 'postLang']); |
|
| 112 | $expectedDataSet = $this->createFlatXMLDataSet(__DIR__ . '/data/test-create-post.xml'); |
|
| 113 | ||
| 114 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
|
| 115 | } |
|
| 116 | ||
| 117 | public function testCreatePostSetTranslations() |
|
| 118 | { |
|
| @@ 26-39 (lines=14) @@ | ||
| 23 | $this->assertEquals(require(__DIR__ . '/data/test-find-posts-na.php'), $data); |
|
| 24 | } |
|
| 25 | ||
| 26 | public function testCreatePost() |
|
| 27 | { |
|
| 28 | $post = new Post([ |
|
| 29 | 'title' => 'New post title', |
|
| 30 | 'body' => 'New post body', |
|
| 31 | ]); |
|
| 32 | ||
| 33 | $this->assertTrue($post->save()); |
|
| 34 | ||
| 35 | $dataSet = $this->getConnection()->createDataSet(['post', 'postLang']); |
|
| 36 | $expectedDataSet = $this->createFlatXMLDataSet(__DIR__ . '/data/test-create-post-na.xml'); |
|
| 37 | ||
| 38 | $this->assertDataSetsEqual($expectedDataSet, $dataSet); |
|
| 39 | } |
|
| 40 | ||
| 41 | public function testCreatePostSetTranslations() |
|
| 42 | { |
|