-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testGetBlogTemplates #3067
testGetBlogTemplates #3067
Conversation
$this->Blog->BcBaser->siteConfig['theme'] = $theme; | ||
$result = $this->Blog->getBlogTemplates(); | ||
$this->assertEquals($result, $expected, 'ブログテンプレートを正しく取得できません'); | ||
$result = $this->Blog->getBlogTemplates(1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nghiem-mb getBlogTempletes
の第一引き数 $siteId の初期値は、1に変更してください。
baserCMS4から、baserCMS5になるにあたり、site_id が 0 というのはなくなったためです。
$this->assertEquals($result, $expected, 'ブログテンプレートを正しく取得できません'); | ||
$result = $this->Blog->getBlogTemplates(1); | ||
$this->assertEquals($expected, $result); | ||
$this->expectException('Cake\Datasource\Exception\RecordNotFoundException'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nghiem-mb ヘルパー呼び出しの際に、RecordNotFoundException
が出てしまうのは良くないので、どこかで例外処理を書く必要があります。
} | ||
|
||
public static function getBlogTemplatesDataProvider() | ||
{ | ||
return [ | ||
['nada-icons', ['default' => 'default']] | ||
['nada-icons', ['Blog' => 'Blog','default' => 'default']] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nghiem-mb 結果に、'Blog' => 'Blog'
が入ってしまってはいけません。何が原因か調査してもらってもいいですか?
#3113 |
No description provided.