diff --git a/plugins/bc-blog/tests/TestCase/Service/BlogPostsServiceTest.php b/plugins/bc-blog/tests/TestCase/Service/BlogPostsServiceTest.php index 6a159831e7..9ab0ed5939 100755 --- a/plugins/bc-blog/tests/TestCase/Service/BlogPostsServiceTest.php +++ b/plugins/bc-blog/tests/TestCase/Service/BlogPostsServiceTest.php @@ -893,19 +893,7 @@ public function testBatch() // データを生成 BlogContentFactory::make([ 'id' => 5, - 'description' => 'baserCMS inc. [デモ] の最新の情報をお届けします。', - 'template' => 'default', - 'list_count' => '10', - 'list_direction' => 'DESC', - 'feed_count' => '10', - 'tag_use' => '1', - 'comment_use' => '1', - 'comment_approve' => '0', - 'widget_area' => '2', 'eye_catch_size' => 'YTo0OntzOjExOiJ0aHVtYl93aWR0aCI7czozOiIzMDAiO3M6MTI6InRodW1iX2hlaWdodCI7czozOiIzMDAiO3M6MTg6Im1vYmlsZV90aHVtYl93aWR0aCI7czozOiIxMDAiO3M6MTk6Im1vYmlsZV90aHVtYl9oZWlnaHQiO3M6MzoiMTAwIjt9', - 'use_content' => '1', - 'created' => '2015-08-10 18:57:47', - 'modified' => NULL, ])->persist(); BlogPostFactory::make(['id' => '1', 'blog_content_id' => '5', 'title' => 'test blog post batch'])->persist(); BlogPostFactory::make(['id' => '2', 'blog_content_id' => '5', 'title' => 'test blog post batch'])->persist(); @@ -931,8 +919,8 @@ public function testBatch() // 存在しない id を指定された場合は例外が発生すること // サービスメソッドを呼ぶ - $this->expectException('Cake\Datasource\Exception\RecordNotFoundException'); - $result = $this->BlogPostsService->batch('delete', [1, 2, 3]); + $this->expectException(\TypeError::class); + $this->BlogPostsService->batch('update', [1, 2, 3]); } /** diff --git a/plugins/bc-blog/tests/TestCase/Service/BlogTagsServiceTest.php b/plugins/bc-blog/tests/TestCase/Service/BlogTagsServiceTest.php index 46f3bedcc3..56ce42ef81 100755 --- a/plugins/bc-blog/tests/TestCase/Service/BlogTagsServiceTest.php +++ b/plugins/bc-blog/tests/TestCase/Service/BlogTagsServiceTest.php @@ -124,7 +124,6 @@ public function testCreateIndexOrder() */ public function test_batch() { - $this->markTestIncomplete('このテストは未確認です'); // データを生成 $this->loadFixtureScenario(BlogTagsScenario::class); @@ -148,8 +147,8 @@ public function test_batch() // 存在しない id を指定された場合は例外が発生すること // サービスメソッドを呼ぶ - $this->expectException('Cake\Datasource\Exception\RecordNotFoundException'); - $this->BlogTagsService->batch('delete', [1, 2, 3]); + $this->expectException(\TypeError::class); + $this->BlogTagsService->batch('update', [1, 2, 3]); } /**