Skip to content

Commit

Permalink
Merge pull request #112 from NetCommons3/bugfix
Browse files Browse the repository at this point in the history
test: テスト条件見直し Model/Topic/PrivateGetRoomsConditionsTest
  • Loading branch information
akagane99 committed Dec 14, 2018
2 parents 128b8b1 + 1b9cbbf commit 3aafd84
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Model/TopicFramesPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ public function getPlugins($topicFrameSetting, $conditions = []) {
public function saveTopicFramesPlugin($data) {
$pluginKeys = [];
if (isset($data[$this->alias]['plugin_key'])) {
foreach ($data[$this->alias]['plugin_key'] as $plugin_key) {
$pluginKeys[] = $plugin_key;
foreach ($data[$this->alias]['plugin_key'] as $pluginKey) {
$pluginKeys[] = $pluginKey;
}
}

Expand Down
37 changes: 19 additions & 18 deletions Test/Case/Model/Topic/PrivateGetRoomsConditionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @package NetCommons\Topics\Test\Case\Model\Topic
* @see Topic::__getRoomsConditions()
*/
class PrivateTopicGetRoomsConditionsTest extends NetCommonsModelTestCase {

Expand Down Expand Up @@ -154,8 +155,8 @@ public function dataProvider() {
0 => array(
'Topic.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
3 => '11',
4 => '12',
),
Expand All @@ -181,10 +182,10 @@ public function dataProvider() {
'Block.public_type' => '2',
0 => array(
'OR' =>
array(
'Block.publish_start <=' => $now,
'Block.publish_start' => null,
),
array(
'Block.publish_start <=' => $now,
'Block.publish_start' => null,
),
),
1 => array(
'OR' => array(
Expand All @@ -196,8 +197,8 @@ public function dataProvider() {
2 => array(
'Block.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
3 => '11',
4 => '12',
),
Expand All @@ -216,8 +217,8 @@ public function dataProvider() {
0 => array(
'Topic.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
3 => '11',
4 => '12',
),
Expand Down Expand Up @@ -258,8 +259,8 @@ public function dataProvider() {
2 => array(
'Block.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
3 => '11',
),
),
Expand All @@ -278,8 +279,8 @@ public function dataProvider() {
0 => array(
'Topic.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
3 => '11',
),
'Topic.is_latest' => true,
Expand Down Expand Up @@ -361,8 +362,8 @@ public function dataProvider() {
'OR' => array(
'Topic.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
3 => '12',
),
'TopicReadable.user_id' => $userId,
Expand Down Expand Up @@ -428,8 +429,8 @@ public function dataProvider() {
'OR' => array(
'Topic.room_id' => array(
0 => '2',
1 => '5',
2 => '4',
1 => '4',
2 => '5',
),
'TopicReadable.user_id' => $userId,
),
Expand Down

0 comments on commit 3aafd84

Please sign in to comment.