@@ -105,19 +105,19 @@ discard block |
||
105 | 105 | expect('decorate should add Behavior data and Category data to an array of UserBehaviors', |
106 | 106 | $this->assertEquals( |
107 | 107 | $this->user_behavior->decorateWithCategory($this->singleSimpleBehaviorNoBehavior), |
108 | - [['id' => 396, |
|
109 | - 'user_id' => 2, |
|
110 | - 'behavior_id' => 107, |
|
111 | - 'date' => '2016-06-17 04:12:43', |
|
112 | - 'behavior' => [ |
|
113 | - 'id' => 107, |
|
114 | - 'name' => 'numb', |
|
115 | - 'category_id' => 6, |
|
116 | - 'category' => [ |
|
117 | - 'id' => 6, |
|
118 | - 'name' => 'Exhausted', |
|
119 | - ] |
|
120 | - ]]])); |
|
108 | + [['id' => 396, |
|
109 | + 'user_id' => 2, |
|
110 | + 'behavior_id' => 107, |
|
111 | + 'date' => '2016-06-17 04:12:43', |
|
112 | + 'behavior' => [ |
|
113 | + 'id' => 107, |
|
114 | + 'name' => 'numb', |
|
115 | + 'category_id' => 6, |
|
116 | + 'category' => [ |
|
117 | + 'id' => 6, |
|
118 | + 'name' => 'Exhausted', |
|
119 | + ] |
|
120 | + ]]])); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | public function testGetBehaviorsByCategory() { |
@@ -198,6 +198,6 @@ discard block |
||
198 | 198 | $bhvrs = require(__DIR__.'/../data/behaviorsWithCounts.php'); |
199 | 199 | $expected = require(__DIR__.'/../data/expected_getCheckinBreakdown.php'); |
200 | 200 | $this->user_behavior->method('getBehaviorsWithCounts')->willReturn(...$bhvrs); |
201 | - expect('asdf', $this->assertEquals($expected, $this->user_behavior->getCheckinBreakdown())); |
|
201 | + expect('asdf', $this->assertEquals($expected, $this->user_behavior->getCheckinBreakdown())); |
|
202 | 202 | } |
203 | 203 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | ]; |
34 | 34 | public function setUp() { |
35 | 35 | // pull in test data |
36 | - $data = require(__DIR__.'/../data/checkinData.php'); |
|
36 | + $data = require(__DIR__ . '/../data/checkinData.php'); |
|
37 | 37 | $this->singleBhvr = $data['singleBhvr']; |
38 | 38 | $this->manyBhvrs = $data['manyBhvrs']; |
39 | 39 | $this->allBhvrs = $data['allBhvrs']; |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $this->container->set('common\interfaces\UserInterface', '\site\tests\_support\MockUser'); |
44 | 44 | $this->container->set('common\interfaces\QuestionInterface', '\site\tests\_support\MockQuestion'); |
45 | 45 | $this->container->set('common\interfaces\BehaviorInterface', 'common\models\Behavior'); |
46 | - $this->container->set('common\interfaces\TimeInterface', function () { |
|
46 | + $this->container->set('common\interfaces\TimeInterface', function() { |
|
47 | 47 | return new \common\components\Time('America/Los_Angeles'); |
48 | 48 | }); |
49 | 49 | |
@@ -195,8 +195,8 @@ discard block |
||
195 | 195 | ->setMethods(['getIsNewRecord', 'save', 'getBehaviorsByDate', 'getBehaviorsWithCounts']) |
196 | 196 | ->getMock(); |
197 | 197 | |
198 | - $bhvrs = require(__DIR__.'/../data/behaviorsWithCounts.php'); |
|
199 | - $expected = require(__DIR__.'/../data/expected_getCheckinBreakdown.php'); |
|
198 | + $bhvrs = require(__DIR__ . '/../data/behaviorsWithCounts.php'); |
|
199 | + $expected = require(__DIR__ . '/../data/expected_getCheckinBreakdown.php'); |
|
200 | 200 | $this->user_behavior->method('getBehaviorsWithCounts')->willReturn(...$bhvrs); |
201 | 201 | expect('asdf', $this->assertEquals($expected, $this->user_behavior->getCheckinBreakdown())); |
202 | 202 | } |