| @@ -15,6 +15,6 @@ | ||
| 15 | 15 |          $this->batchInsert("{{%option}}", ["name", "category_id"],[ | 
| 16 | 16 | ["masturbation", 3] | 
| 17 | 17 | , ["pornography", 3] | 
| 18 | - ]); | |
| 18 | + ]); | |
| 19 | 19 | } | 
| 20 | 20 | } | 
| @@ -12,7 +12,7 @@ | ||
| 12 | 12 | |
| 13 | 13 | public function safeDown() | 
| 14 | 14 |      { | 
| 15 | -        $this->batchInsert("{{%option}}", ["name", "category_id"],[ | |
| 15 | +        $this->batchInsert("{{%option}}", ["name", "category_id"], [ | |
| 16 | 16 | ["masturbation", 3] | 
| 17 | 17 | , ["pornography", 3] | 
| 18 | 18 | ]); | 
| @@ -12,6 +12,6 @@ | ||
| 12 | 12 | |
| 13 | 13 | public function down() | 
| 14 | 14 |      { | 
| 15 | - echo "Why even revert this."; | |
| 15 | + echo "Why even revert this."; | |
| 16 | 16 | } | 
| 17 | 17 | } | 
| @@ -120,39 +120,39 @@ | ||
| 120 | 120 | ["sleeping too much or too little", 6], | 
| 121 | 121 | ["can't cope", 6], | 
| 122 | 122 | ["overwhelmed", 6], | 
| 123 | - ['crying for "no reason"', 6], | |
| 124 | - ["can't think", 6], | |
| 125 | - ["forgetful", 6], | |
| 126 | - ["pessimistic", 6], | |
| 127 | - ["helpless", 6], | |
| 128 | - ["tired", 6], | |
| 129 | - ["numb", 6], | |
| 130 | - ["wanting to run", 6], | |
| 131 | - ["constant cravings for old coping behaviors", 6], | |
| 132 | - ["thinking of using drugs and alcohol", 6], | |
| 133 | - ["seeking out old unhealthy people and places", 6], | |
| 134 | - ["really isolated", 6], | |
| 135 | - ["people are angry with you", 6], | |
| 136 | - ["self-abuse", 6], | |
| 137 | - ["suicidal thoughts", 6], | |
| 138 | - ["no goals", 6], | |
| 139 | - ["survival mode", 6], | |
| 140 | - ["not returning phone calls", 6], | |
| 141 | - ["missing work", 6], | |
| 142 | - ["irritability", 6], | |
| 143 | - ["loss of appetite", 6], | |
| 144 | - ["returning to the place you swore you would never go again", 7], | |
| 145 | - ["giving up", 7], | |
| 146 | - ["giving in", 7], | |
| 147 | - ["out of control", 7], | |
| 148 | - ["lost in your addiction", 7], | |
| 149 | - ["lying to yourself and others", 7], | |
| 150 | - ["feeling you just can't manage without your coping behavior, at least for now", 7], | |
| 151 | - ["shame", 7], | |
| 152 | - ["condemnation", 7], | |
| 153 | - ["guilt", 7], | |
| 154 | - ["aloneness", 7] | |
| 155 | - ]); | |
| 123 | + ['crying for "no reason"', 6], | |
| 124 | + ["can't think", 6], | |
| 125 | + ["forgetful", 6], | |
| 126 | + ["pessimistic", 6], | |
| 127 | + ["helpless", 6], | |
| 128 | + ["tired", 6], | |
| 129 | + ["numb", 6], | |
| 130 | + ["wanting to run", 6], | |
| 131 | + ["constant cravings for old coping behaviors", 6], | |
| 132 | + ["thinking of using drugs and alcohol", 6], | |
| 133 | + ["seeking out old unhealthy people and places", 6], | |
| 134 | + ["really isolated", 6], | |
| 135 | + ["people are angry with you", 6], | |
| 136 | + ["self-abuse", 6], | |
| 137 | + ["suicidal thoughts", 6], | |
| 138 | + ["no goals", 6], | |
| 139 | + ["survival mode", 6], | |
| 140 | + ["not returning phone calls", 6], | |
| 141 | + ["missing work", 6], | |
| 142 | + ["irritability", 6], | |
| 143 | + ["loss of appetite", 6], | |
| 144 | + ["returning to the place you swore you would never go again", 7], | |
| 145 | + ["giving up", 7], | |
| 146 | + ["giving in", 7], | |
| 147 | + ["out of control", 7], | |
| 148 | + ["lost in your addiction", 7], | |
| 149 | + ["lying to yourself and others", 7], | |
| 150 | + ["feeling you just can't manage without your coping behavior, at least for now", 7], | |
| 151 | + ["shame", 7], | |
| 152 | + ["condemnation", 7], | |
| 153 | + ["guilt", 7], | |
| 154 | + ["aloneness", 7] | |
| 155 | + ]); | |
| 156 | 156 | } | 
| 157 | 157 | |
| 158 | 158 | public function safeDown() | 
| @@ -19,7 +19,7 @@ | ||
| 19 | 19 | */ | 
| 20 | 20 | |
| 21 | 21 | |
| 22 | -        $this->batchInsert("{{%option}}", ["name", "category_id"],[ | |
| 22 | +        $this->batchInsert("{{%option}}", ["name", "category_id"], [ | |
| 23 | 23 | ["no current secrets", 1], | 
| 24 | 24 | ["resolving problems", 1], | 
| 25 | 25 | ["identifying fears and feelings", 1], | 
| @@ -31,16 +31,18 @@ | ||
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 |    public function getLocalTime($timezone = null) { | 
| 34 | - if($timezone === null) | |
| 35 | - $timezone = $this->timezone; | |
| 34 | +    if($timezone === null) { | |
| 35 | + $timezone = $this->timezone; | |
| 36 | + } | |
| 36 | 37 | |
| 37 | 38 |      $timestamp = new DateTime("now", new DateTimeZone($timezone)); | 
| 38 | 39 |      return $timestamp->format("Y-m-d H:i:s"); | 
| 39 | 40 | } | 
| 40 | 41 | |
| 41 | 42 |    public function getLocalDate($timezone = null) { | 
| 42 | - if($timezone === null) | |
| 43 | - $timezone = $this->timezone; | |
| 43 | +    if($timezone === null) { | |
| 44 | + $timezone = $this->timezone; | |
| 45 | + } | |
| 44 | 46 | |
| 45 | 47 |      return (new DateTime("now", new DateTimeZone($timezone))) | 
| 46 | 48 |        ->format("Y-m-d"); | 
| @@ -27,11 +27,11 @@ discard block | ||
| 27 | 27 | */ | 
| 28 | 28 |    public function parse(string $time, string $format = 'Y-m-d') { | 
| 29 | 29 | $dt = DateTime::createFromFormat($format, $time, new DateTimeZone($this->timezone)); | 
| 30 | -    if($dt) { | |
| 30 | +    if ($dt) { | |
| 31 | 31 | // for some reason, using createFromFromat adds in the time. The regular DateTime constructor _does not_ do this. We manually zero out the time here to make the DateTime objects match. | 
| 32 | 32 | $dt->setTime(0, 0, 0); | 
| 33 | 33 | $formatted = $dt->format($format); | 
| 34 | -      if($formatted === $time && $this->inBounds($dt)) { | |
| 34 | +      if ($formatted === $time && $this->inBounds($dt)) { | |
| 35 | 35 | return $dt; | 
| 36 | 36 | } | 
| 37 | 37 | } | 
| @@ -50,7 +50,7 @@ discard block | ||
| 50 | 50 |      $test  = strtotime($dt->format('Y-m-d')); | 
| 51 | 51 | $now = strtotime($this->getLocalDate()); | 
| 52 | 52 | |
| 53 | -    if($first <= $test && $test <= $now) { | |
| 53 | +    if ($first <= $test && $test <= $now) { | |
| 54 | 54 | return true; | 
| 55 | 55 |      } else { | 
| 56 | 56 | return false; | 
| @@ -74,7 +74,7 @@ discard block | ||
| 74 | 74 | } | 
| 75 | 75 | |
| 76 | 76 |    public function getLocalTime($timezone = null) { | 
| 77 | - if($timezone === null) | |
| 77 | + if ($timezone === null) | |
| 78 | 78 | $timezone = $this->timezone; | 
| 79 | 79 | |
| 80 | 80 |      $timestamp = new DateTime("now", new DateTimeZone($timezone)); | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | } | 
| 83 | 83 | |
| 84 | 84 |    public function getLocalDate($timezone = null) { | 
| 85 | - if($timezone === null) | |
| 85 | + if ($timezone === null) | |
| 86 | 86 | $timezone = $this->timezone; | 
| 87 | 87 | |
| 88 | 88 |      return (new DateTime("now", new DateTimeZone($timezone))) | 
| @@ -96,7 +96,7 @@ discard block | ||
| 96 | 96 | |
| 97 | 97 |    public function getUTCBookends($local) { | 
| 98 | 98 | $local = trim($local); | 
| 99 | -    if(strpos($local, " ")) { | |
| 99 | +    if (strpos($local, " ")) { | |
| 100 | 100 | return false; | 
| 101 | 101 | } | 
| 102 | 102 | |
| @@ -25,7 +25,7 @@ discard block | ||
| 25 | 25 |    public function getFilepath() { | 
| 26 | 26 |      $path = Yii::getAlias('@graphImgPath'); | 
| 27 | 27 | $filename = $this->user->getIdHash() . ".png"; | 
| 28 | - return $path. '/' . $filename; | |
| 28 | + return $path . '/' . $filename; | |
| 29 | 29 | } | 
| 30 | 30 | |
| 31 | 31 | /** | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 | * @return string the encoded image | 
| 59 | 59 | */ | 
| 60 | 60 |    public function create(array $values, bool $save = false) { | 
| 61 | -    if($save) { | |
| 61 | +    if ($save) { | |
| 62 | 62 | // wipe out the current image, if it exists | 
| 63 | 63 | $this->destroy(); | 
| 64 | 64 | } | 
| @@ -95,9 +95,9 @@ discard block | ||
| 95 | 95 | imagepng($img); | 
| 96 | 96 | $img_data = ob_get_clean(); | 
| 97 | 97 | |
| 98 | -    if($save) { | |
| 98 | +    if ($save) { | |
| 99 | 99 | $filepath = $this->getFilepath(); | 
| 100 | -      if(!is_dir(dirname($filepath))) { | |
| 100 | +      if (!is_dir(dirname($filepath))) { | |
| 101 | 101 | mkdir(dirname($filepath), 0766, true); | 
| 102 | 102 | } | 
| 103 | 103 | |
| @@ -7,7 +7,7 @@ discard block | ||
| 7 | 7 | public static $REVISION_FILE = "./REVISION"; | 
| 8 | 8 | |
| 9 | 9 |    public static function getGithubRevUrl($file = false) { | 
| 10 | -    if($hash = self::getRevHash($file)) { | |
| 10 | +    if ($hash = self::getRevHash($file)) { | |
| 11 | 11 | return "https://github.com/CorWatts/fasterscale/commit/$hash"; | 
| 12 | 12 | } | 
| 13 | 13 | return false; | 
| @@ -15,7 +15,7 @@ discard block | ||
| 15 | 15 | |
| 16 | 16 |    public static function getRevHash($file = false) { | 
| 17 | 17 | $file = $file ?: self::$REVISION_FILE; | 
| 18 | -    if(is_file($file) && is_readable($file)) { | |
| 18 | +    if (is_file($file) && is_readable($file)) { | |
| 19 | 19 | return substr(file_get_contents($file), 0, 7); | 
| 20 | 20 | } | 
| 21 | 21 | return false; | 
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 | protected function tearDown() | 
| 23 | 23 |    { | 
| 24 | 24 | // just in case we're forgetful :) | 
| 25 | - if(file_exists(Utility::$REVISION_FILE)) $this->_deleteRevFile(); | |
| 25 | + if (file_exists(Utility::$REVISION_FILE)) $this->_deleteRevFile(); | |
| 26 | 26 | parent::tearDown(); | 
| 27 | 27 | } | 
| 28 | 28 | |
| @@ -37,7 +37,7 @@ discard block | ||
| 37 | 37 | |
| 38 | 38 | public function testGetRevHash() | 
| 39 | 39 |    { | 
| 40 | -    $this->specify('getRevHash should function correctly', function () { | |
| 40 | +    $this->specify('getRevHash should function correctly', function() { | |
| 41 | 41 |        expect('getRevHash should return false when the file does not exist', $this->assertFalse(Utility::getRevHash())); | 
| 42 | 42 | |
| 43 | 43 | $this->_createRevFile(); | 
| @@ -22,7 +22,9 @@ | ||
| 22 | 22 | protected function tearDown() | 
| 23 | 23 |    { | 
| 24 | 24 | // just in case we're forgetful :) | 
| 25 | - if(file_exists(Utility::$REVISION_FILE)) $this->_deleteRevFile(); | |
| 25 | +    if(file_exists(Utility::$REVISION_FILE)) { | |
| 26 | + $this->_deleteRevFile(); | |
| 27 | + } | |
| 26 | 28 | parent::tearDown(); | 
| 27 | 29 | } | 
| 28 | 30 | |
| @@ -14,8 +14,8 @@ discard block | ||
| 14 | 14 | use \Codeception\Specify; | 
| 15 | 15 | |
| 16 | 16 | private $user; | 
| 17 | - private $filepath = __DIR__.'/../../_output/test_graph.png'; | |
| 18 | - private $filepath_extra = __DIR__.'/../../_output/charts/test_graph.png'; | |
| 17 | + private $filepath = __DIR__ . '/../../_output/test_graph.png'; | |
| 18 | + private $filepath_extra = __DIR__ . '/../../_output/charts/test_graph.png'; | |
| 19 | 19 | |
| 20 | 20 |    public function setUp() { | 
| 21 | 21 |      $this->user = $this->getMockBuilder('\site\tests\_support\MockUser') | 
| @@ -36,7 +36,7 @@ discard block | ||
| 36 | 36 |        ->willReturn('random1DH4sh'); | 
| 37 | 37 | $graph = new Graph($this->user); | 
| 38 | 38 | |
| 39 | -    expect('the expected graph image filepath will be returned', $this->assertEquals(dirname(dirname(dirname(dirname(__DIR__)))).'/site/web/charts/random1DH4sh.png', $graph->getFilepath())); | |
| 39 | +    expect('the expected graph image filepath will be returned', $this->assertEquals(dirname(dirname(dirname(dirname(__DIR__)))) . '/site/web/charts/random1DH4sh.png', $graph->getFilepath())); | |
| 40 | 40 | } | 
| 41 | 41 | |
| 42 | 42 |    public function testGetUrl() { | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 |        ->method('getFilepath') | 
| 65 | 65 | ->willReturn($this->filepath); | 
| 66 | 66 | |
| 67 | -    if(!file_exists($this->filepath) && preg_match('%/_output/test_graph.png$%', $this->filepath)) { | |
| 67 | +    if (!file_exists($this->filepath) && preg_match('%/_output/test_graph.png$%', $this->filepath)) { | |
| 68 | 68 | touch($this->filepath); | 
| 69 | 69 |        expect('just a check to be sure $filepath is sane', $this->assertStringEndsWith('/_output/test_graph.png', $this->filepath)); | 
| 70 | 70 |        expect('the generated file should exist', $this->assertFileExists($this->filepath)); | 
| @@ -103,7 +103,7 @@ discard block | ||
| 103 | 103 |      expect('the generated file should be readable', $this->assertFileExists($this->filepath_extra)); | 
| 104 | 104 | |
| 105 | 105 | // cleanup | 
| 106 | -    if(file_exists($this->filepath_extra) && preg_match('%/_output/charts/test_graph.png%', $this->filepath_extra)) { | |
| 106 | +    if (file_exists($this->filepath_extra) && preg_match('%/_output/charts/test_graph.png%', $this->filepath_extra)) { | |
| 107 | 107 | // just in case something is weird, we don't want to straight rm this file | 
| 108 | 108 | unlink($this->filepath_extra); | 
| 109 | 109 | rmdir(dirname($this->filepath_extra)); | 
| @@ -17,652 +17,652 @@ | ||
| 17 | 17 | |
| 18 | 18 | private $user; | 
| 19 | 19 | |
| 20 | - public $questionData = [ | |
| 21 | - [ | |
| 22 | - 'id' => 641, | |
| 23 | - 'user_id' => 2, | |
| 24 | - 'behavior_id' => 13, | |
| 25 | - 'user_behavior_id' => 821, | |
| 26 | - 'question' => 1, | |
| 27 | - 'answer' => 'alsgn', | |
| 28 | - 'date' => '2016-09-10 19:27:43', | |
| 29 | - 'behavior' => | |
| 30 | - [ | |
| 31 | - 'id' => 13, | |
| 32 | - 'name' => 'less time/energy for God, meetings, and church', | |
| 33 | - 'category_id' => 2, | |
| 34 | - ], | |
| 35 | - ], | |
| 36 | - [ | |
| 37 | - 'id' => 642, | |
| 38 | - 'user_id' => 2, | |
| 39 | - 'behavior_id' => 13, | |
| 40 | - 'user_behavior_id' => 821, | |
| 41 | - 'question' => 2, | |
| 42 | - 'answer' => 'loiun', | |
| 43 | - 'date' => '2016-09-10 19:27:43', | |
| 44 | - 'behavior' => | |
| 45 | - [ | |
| 46 | - 'id' => 13, | |
| 47 | - 'name' => 'less time/energy for God, meetings, and church', | |
| 48 | - 'category_id' => 2, | |
| 49 | - ], | |
| 50 | - ], | |
| 51 | - [ | |
| 52 | - 'id' => 643, | |
| 53 | - 'user_id' => 2, | |
| 54 | - 'behavior_id' => 13, | |
| 55 | - 'user_behavior_id' => 821, | |
| 56 | - 'question' => 3, | |
| 57 | - 'answer' => 'liun', | |
| 58 | - 'date' => '2016-09-10 19:27:43', | |
| 59 | - 'behavior' => | |
| 60 | - [ | |
| 61 | - 'id' => 13, | |
| 62 | - 'name' => 'less time/energy for God, meetings, and church', | |
| 63 | - 'category_id' => 2, | |
| 64 | - ], | |
| 65 | - ], | |
| 66 | - [ | |
| 67 | - 'id' => 644, | |
| 68 | - 'user_id' => 2, | |
| 69 | - 'behavior_id' => 29, | |
| 70 | - 'user_behavior_id' => 823, | |
| 71 | - 'question' => 1, | |
| 72 | - 'answer' => 'ljnb', | |
| 73 | - 'date' => '2016-09-10 19:27:43', | |
| 74 | - 'behavior' => | |
| 75 | - [ | |
| 76 | - 'id' => 29, | |
| 77 | - 'name' => 'using profanity', | |
| 78 | - 'category_id' => 3, | |
| 79 | - ], | |
| 80 | - ], | |
| 81 | - [ | |
| 82 | - 'id' => 645, | |
| 83 | - 'user_id' => 2, | |
| 84 | - 'behavior_id' => 29, | |
| 85 | - 'user_behavior_id' => 823, | |
| 86 | - 'question' => 2, | |
| 87 | - 'answer' => 'liunb', | |
| 88 | - 'date' => '2016-09-10 19:27:43', | |
| 89 | - 'behavior' => | |
| 90 | - [ | |
| 91 | - 'id' => 29, | |
| 92 | - 'name' => 'using profanity', | |
| 93 | - 'category_id' => 3, | |
| 94 | - ], | |
| 95 | - ], | |
| 96 | - [ | |
| 97 | - 'id' => 646, | |
| 98 | - 'user_id' => 2, | |
| 99 | - 'behavior_id' => 29, | |
| 100 | - 'user_behavior_id' => 823, | |
| 101 | - 'question' => 3, | |
| 102 | - 'answer' => 'ilub ', | |
| 103 | - 'date' => '2016-09-10 19:27:43', | |
| 104 | - 'behavior' => | |
| 105 | - [ | |
| 106 | - 'id' => 29, | |
| 107 | - 'name' => 'using profanity', | |
| 108 | - 'category_id' => 3, | |
| 109 | - ], | |
| 110 | - ], | |
| 111 | - [ | |
| 112 | - 'id' => 647, | |
| 113 | - 'user_id' => 2, | |
| 114 | - 'behavior_id' => 48, | |
| 115 | - 'user_behavior_id' => 825, | |
| 116 | - 'question' => 1, | |
| 117 | - 'answer' => 'liub', | |
| 118 | - 'date' => '2016-09-10 19:27:43', | |
| 119 | - 'behavior' => | |
| 120 | - [ | |
| 121 | - 'id' => 48, | |
| 122 | - 'name' => 'workaholic', | |
| 123 | - 'category_id' => 4, | |
| 124 | - ], | |
| 125 | - ], | |
| 126 | - [ | |
| 127 | - 'id' => 648, | |
| 128 | - 'user_id' => 2, | |
| 129 | - 'behavior_id' => 48, | |
| 130 | - 'user_behavior_id' => 825, | |
| 131 | - 'question' => 2, | |
| 132 | - 'answer' => 'liub', | |
| 133 | - 'date' => '2016-09-10 19:27:43', | |
| 134 | - 'behavior' => | |
| 135 | - [ | |
| 136 | - 'id' => 48, | |
| 137 | - 'name' => 'workaholic', | |
| 138 | - 'category_id' => 4, | |
| 139 | - ], | |
| 140 | - ], | |
| 141 | - [ | |
| 142 | - 'id' => 649, | |
| 143 | - 'user_id' => 2, | |
| 144 | - 'behavior_id' => 48, | |
| 145 | - 'user_behavior_id' => 825, | |
| 146 | - 'question' => 3, | |
| 147 | - 'answer' => 'liub ', | |
| 148 | - 'date' => '2016-09-10 19:27:43', | |
| 149 | - 'behavior' => | |
| 150 | - [ | |
| 151 | - 'id' => 48, | |
| 152 | - 'name' => 'workaholic', | |
| 153 | - 'category_id' => 4, | |
| 154 | - ], | |
| 155 | - ], | |
| 156 | - [ | |
| 157 | - 'id' => 650, | |
| 158 | - 'user_id' => 2, | |
| 159 | - 'behavior_id' => 89, | |
| 160 | - 'user_behavior_id' => 828, | |
| 161 | - 'question' => 1, | |
| 162 | - 'answer' => 'liub', | |
| 163 | - 'date' => '2016-09-10 19:27:43', | |
| 164 | - 'behavior' => | |
| 165 | - [ | |
| 166 | - 'id' => 89, | |
| 167 | - 'name' => 'obsessive (stuck) thoughts', | |
| 168 | - 'category_id' => 5, | |
| 169 | - ], | |
| 170 | - ], | |
| 171 | - [ | |
| 172 | - 'id' => 651, | |
| 173 | - 'user_id' => 2, | |
| 174 | - 'behavior_id' => 89, | |
| 175 | - 'user_behavior_id' => 828, | |
| 176 | - 'question' => 2, | |
| 177 | - 'answer' => 'liuby', | |
| 178 | - 'date' => '2016-09-10 19:27:43', | |
| 179 | - 'behavior' => | |
| 180 | - [ | |
| 181 | - 'id' => 89, | |
| 182 | - 'name' => 'obsessive (stuck) thoughts', | |
| 183 | - 'category_id' => 5, | |
| 184 | - ], | |
| 185 | - ], | |
| 186 | - [ | |
| 187 | - 'id' => 652, | |
| 188 | - 'user_id' => 2, | |
| 189 | - 'behavior_id' => 89, | |
| 190 | - 'user_behavior_id' => 828, | |
| 191 | - 'question' => 3, | |
| 192 | - 'answer' => 'uiylb', | |
| 193 | - 'date' => '2016-09-10 19:27:43', | |
| 194 | - 'behavior' => | |
| 195 | - [ | |
| 196 | - 'id' => 89, | |
| 197 | - 'name' => 'obsessive (stuck) thoughts', | |
| 198 | - 'category_id' => 5, | |
| 199 | - ], | |
| 200 | - ], | |
| 201 | - [ | |
| 202 | - 'id' => 653, | |
| 203 | - 'user_id' => 2, | |
| 204 | - 'behavior_id' => 111, | |
| 205 | - 'user_behavior_id' => 829, | |
| 206 | - 'question' => 1, | |
| 207 | - 'answer' => 'liub', | |
| 208 | - 'date' => '2016-09-10 19:27:43', | |
| 209 | - 'behavior' => | |
| 210 | - [ | |
| 211 | - 'id' => 111, | |
| 212 | - 'name' => 'seeking out old unhealthy people and places', | |
| 213 | - 'category_id' => 6, | |
| 214 | - ], | |
| 215 | - ], | |
| 216 | - [ | |
| 217 | - 'id' => 654, | |
| 218 | - 'user_id' => 2, | |
| 219 | - 'behavior_id' => 111, | |
| 220 | - 'user_behavior_id' => 829, | |
| 221 | - 'question' => 2, | |
| 222 | - 'answer' => 'liuyb', | |
| 223 | - 'date' => '2016-09-10 19:27:43', | |
| 224 | - 'behavior' => | |
| 225 | - [ | |
| 226 | - 'id' => 111, | |
| 227 | - 'name' => 'seeking out old unhealthy people and places', | |
| 228 | - 'category_id' => 6, | |
| 229 | - ], | |
| 230 | - ], | |
| 231 | - [ | |
| 232 | - 'id' => 655, | |
| 233 | - 'user_id' => 2, | |
| 234 | - 'behavior_id' => 111, | |
| 235 | - 'user_behavior_id' => 829, | |
| 236 | - 'question' => 3, | |
| 237 | - 'answer' => 'iuyb', | |
| 238 | - 'date' => '2016-09-10 19:27:43', | |
| 239 | - 'behavior' => | |
| 240 | - [ | |
| 241 | - 'id' => 111, | |
| 242 | - 'name' => 'seeking out old unhealthy people and places', | |
| 243 | - 'category_id' => 6, | |
| 244 | - ], | |
| 245 | - ], | |
| 246 | - [ | |
| 247 | - 'id' => 656, | |
| 248 | - 'user_id' => 2, | |
| 249 | - 'behavior_id' => 122, | |
| 250 | - 'user_behavior_id' => 831, | |
| 251 | - 'question' => 1, | |
| 252 | - 'answer' => 'iuyb', | |
| 253 | - 'date' => '2016-09-10 19:27:43', | |
| 254 | - 'behavior' => | |
| 255 | - [ | |
| 256 | - 'id' => 122, | |
| 257 | - 'name' => 'returning to the place you swore you would never go again', | |
| 258 | - 'category_id' => 7, | |
| 259 | - ], | |
| 260 | - ], | |
| 261 | - [ | |
| 262 | - 'id' => 657, | |
| 263 | - 'user_id' => 2, | |
| 264 | - 'behavior_id' => 122, | |
| 265 | - 'user_behavior_id' => 831, | |
| 266 | - 'question' => 2, | |
| 267 | - 'answer' => 'iuyb', | |
| 268 | - 'date' => '2016-09-10 19:27:43', | |
| 269 | - 'behavior' => | |
| 270 | - [ | |
| 271 | - 'id' => 122, | |
| 272 | - 'name' => 'returning to the place you swore you would never go again', | |
| 273 | - 'category_id' => 7, | |
| 274 | - ], | |
| 275 | - ], | |
| 276 | - [ | |
| 277 | - 'id' => 658, | |
| 278 | - 'user_id' => 2, | |
| 279 | - 'behavior_id' => 122, | |
| 280 | - 'user_behavior_id' => 831, | |
| 281 | - 'question' => 3, | |
| 282 | - 'answer' => 'liuyb', | |
| 283 | - 'date' => '2016-09-10 19:27:43', | |
| 284 | - 'behavior' => | |
| 285 | - [ | |
| 286 | - 'id' => 122, | |
| 287 | - 'name' => 'returning to the place you swore you would never go again', | |
| 288 | - 'category_id' => 7, | |
| 289 | - ], | |
| 290 | - ], | |
| 20 | + public $questionData = [ | |
| 21 | + [ | |
| 22 | + 'id' => 641, | |
| 23 | + 'user_id' => 2, | |
| 24 | + 'behavior_id' => 13, | |
| 25 | + 'user_behavior_id' => 821, | |
| 26 | + 'question' => 1, | |
| 27 | + 'answer' => 'alsgn', | |
| 28 | + 'date' => '2016-09-10 19:27:43', | |
| 29 | + 'behavior' => | |
| 30 | + [ | |
| 31 | + 'id' => 13, | |
| 32 | + 'name' => 'less time/energy for God, meetings, and church', | |
| 33 | + 'category_id' => 2, | |
| 34 | + ], | |
| 35 | + ], | |
| 36 | + [ | |
| 37 | + 'id' => 642, | |
| 38 | + 'user_id' => 2, | |
| 39 | + 'behavior_id' => 13, | |
| 40 | + 'user_behavior_id' => 821, | |
| 41 | + 'question' => 2, | |
| 42 | + 'answer' => 'loiun', | |
| 43 | + 'date' => '2016-09-10 19:27:43', | |
| 44 | + 'behavior' => | |
| 45 | + [ | |
| 46 | + 'id' => 13, | |
| 47 | + 'name' => 'less time/energy for God, meetings, and church', | |
| 48 | + 'category_id' => 2, | |
| 49 | + ], | |
| 50 | + ], | |
| 51 | + [ | |
| 52 | + 'id' => 643, | |
| 53 | + 'user_id' => 2, | |
| 54 | + 'behavior_id' => 13, | |
| 55 | + 'user_behavior_id' => 821, | |
| 56 | + 'question' => 3, | |
| 57 | + 'answer' => 'liun', | |
| 58 | + 'date' => '2016-09-10 19:27:43', | |
| 59 | + 'behavior' => | |
| 60 | + [ | |
| 61 | + 'id' => 13, | |
| 62 | + 'name' => 'less time/energy for God, meetings, and church', | |
| 63 | + 'category_id' => 2, | |
| 64 | + ], | |
| 65 | + ], | |
| 66 | + [ | |
| 67 | + 'id' => 644, | |
| 68 | + 'user_id' => 2, | |
| 69 | + 'behavior_id' => 29, | |
| 70 | + 'user_behavior_id' => 823, | |
| 71 | + 'question' => 1, | |
| 72 | + 'answer' => 'ljnb', | |
| 73 | + 'date' => '2016-09-10 19:27:43', | |
| 74 | + 'behavior' => | |
| 75 | + [ | |
| 76 | + 'id' => 29, | |
| 77 | + 'name' => 'using profanity', | |
| 78 | + 'category_id' => 3, | |
| 79 | + ], | |
| 80 | + ], | |
| 81 | + [ | |
| 82 | + 'id' => 645, | |
| 83 | + 'user_id' => 2, | |
| 84 | + 'behavior_id' => 29, | |
| 85 | + 'user_behavior_id' => 823, | |
| 86 | + 'question' => 2, | |
| 87 | + 'answer' => 'liunb', | |
| 88 | + 'date' => '2016-09-10 19:27:43', | |
| 89 | + 'behavior' => | |
| 90 | + [ | |
| 91 | + 'id' => 29, | |
| 92 | + 'name' => 'using profanity', | |
| 93 | + 'category_id' => 3, | |
| 94 | + ], | |
| 95 | + ], | |
| 96 | + [ | |
| 97 | + 'id' => 646, | |
| 98 | + 'user_id' => 2, | |
| 99 | + 'behavior_id' => 29, | |
| 100 | + 'user_behavior_id' => 823, | |
| 101 | + 'question' => 3, | |
| 102 | + 'answer' => 'ilub ', | |
| 103 | + 'date' => '2016-09-10 19:27:43', | |
| 104 | + 'behavior' => | |
| 105 | + [ | |
| 106 | + 'id' => 29, | |
| 107 | + 'name' => 'using profanity', | |
| 108 | + 'category_id' => 3, | |
| 109 | + ], | |
| 110 | + ], | |
| 111 | + [ | |
| 112 | + 'id' => 647, | |
| 113 | + 'user_id' => 2, | |
| 114 | + 'behavior_id' => 48, | |
| 115 | + 'user_behavior_id' => 825, | |
| 116 | + 'question' => 1, | |
| 117 | + 'answer' => 'liub', | |
| 118 | + 'date' => '2016-09-10 19:27:43', | |
| 119 | + 'behavior' => | |
| 120 | + [ | |
| 121 | + 'id' => 48, | |
| 122 | + 'name' => 'workaholic', | |
| 123 | + 'category_id' => 4, | |
| 124 | + ], | |
| 125 | + ], | |
| 126 | + [ | |
| 127 | + 'id' => 648, | |
| 128 | + 'user_id' => 2, | |
| 129 | + 'behavior_id' => 48, | |
| 130 | + 'user_behavior_id' => 825, | |
| 131 | + 'question' => 2, | |
| 132 | + 'answer' => 'liub', | |
| 133 | + 'date' => '2016-09-10 19:27:43', | |
| 134 | + 'behavior' => | |
| 135 | + [ | |
| 136 | + 'id' => 48, | |
| 137 | + 'name' => 'workaholic', | |
| 138 | + 'category_id' => 4, | |
| 139 | + ], | |
| 140 | + ], | |
| 141 | + [ | |
| 142 | + 'id' => 649, | |
| 143 | + 'user_id' => 2, | |
| 144 | + 'behavior_id' => 48, | |
| 145 | + 'user_behavior_id' => 825, | |
| 146 | + 'question' => 3, | |
| 147 | + 'answer' => 'liub ', | |
| 148 | + 'date' => '2016-09-10 19:27:43', | |
| 149 | + 'behavior' => | |
| 150 | + [ | |
| 151 | + 'id' => 48, | |
| 152 | + 'name' => 'workaholic', | |
| 153 | + 'category_id' => 4, | |
| 154 | + ], | |
| 155 | + ], | |
| 156 | + [ | |
| 157 | + 'id' => 650, | |
| 158 | + 'user_id' => 2, | |
| 159 | + 'behavior_id' => 89, | |
| 160 | + 'user_behavior_id' => 828, | |
| 161 | + 'question' => 1, | |
| 162 | + 'answer' => 'liub', | |
| 163 | + 'date' => '2016-09-10 19:27:43', | |
| 164 | + 'behavior' => | |
| 165 | + [ | |
| 166 | + 'id' => 89, | |
| 167 | + 'name' => 'obsessive (stuck) thoughts', | |
| 168 | + 'category_id' => 5, | |
| 169 | + ], | |
| 170 | + ], | |
| 171 | + [ | |
| 172 | + 'id' => 651, | |
| 173 | + 'user_id' => 2, | |
| 174 | + 'behavior_id' => 89, | |
| 175 | + 'user_behavior_id' => 828, | |
| 176 | + 'question' => 2, | |
| 177 | + 'answer' => 'liuby', | |
| 178 | + 'date' => '2016-09-10 19:27:43', | |
| 179 | + 'behavior' => | |
| 180 | + [ | |
| 181 | + 'id' => 89, | |
| 182 | + 'name' => 'obsessive (stuck) thoughts', | |
| 183 | + 'category_id' => 5, | |
| 184 | + ], | |
| 185 | + ], | |
| 186 | + [ | |
| 187 | + 'id' => 652, | |
| 188 | + 'user_id' => 2, | |
| 189 | + 'behavior_id' => 89, | |
| 190 | + 'user_behavior_id' => 828, | |
| 191 | + 'question' => 3, | |
| 192 | + 'answer' => 'uiylb', | |
| 193 | + 'date' => '2016-09-10 19:27:43', | |
| 194 | + 'behavior' => | |
| 195 | + [ | |
| 196 | + 'id' => 89, | |
| 197 | + 'name' => 'obsessive (stuck) thoughts', | |
| 198 | + 'category_id' => 5, | |
| 199 | + ], | |
| 200 | + ], | |
| 201 | + [ | |
| 202 | + 'id' => 653, | |
| 203 | + 'user_id' => 2, | |
| 204 | + 'behavior_id' => 111, | |
| 205 | + 'user_behavior_id' => 829, | |
| 206 | + 'question' => 1, | |
| 207 | + 'answer' => 'liub', | |
| 208 | + 'date' => '2016-09-10 19:27:43', | |
| 209 | + 'behavior' => | |
| 210 | + [ | |
| 211 | + 'id' => 111, | |
| 212 | + 'name' => 'seeking out old unhealthy people and places', | |
| 213 | + 'category_id' => 6, | |
| 214 | + ], | |
| 215 | + ], | |
| 216 | + [ | |
| 217 | + 'id' => 654, | |
| 218 | + 'user_id' => 2, | |
| 219 | + 'behavior_id' => 111, | |
| 220 | + 'user_behavior_id' => 829, | |
| 221 | + 'question' => 2, | |
| 222 | + 'answer' => 'liuyb', | |
| 223 | + 'date' => '2016-09-10 19:27:43', | |
| 224 | + 'behavior' => | |
| 225 | + [ | |
| 226 | + 'id' => 111, | |
| 227 | + 'name' => 'seeking out old unhealthy people and places', | |
| 228 | + 'category_id' => 6, | |
| 229 | + ], | |
| 230 | + ], | |
| 231 | + [ | |
| 232 | + 'id' => 655, | |
| 233 | + 'user_id' => 2, | |
| 234 | + 'behavior_id' => 111, | |
| 235 | + 'user_behavior_id' => 829, | |
| 236 | + 'question' => 3, | |
| 237 | + 'answer' => 'iuyb', | |
| 238 | + 'date' => '2016-09-10 19:27:43', | |
| 239 | + 'behavior' => | |
| 240 | + [ | |
| 241 | + 'id' => 111, | |
| 242 | + 'name' => 'seeking out old unhealthy people and places', | |
| 243 | + 'category_id' => 6, | |
| 244 | + ], | |
| 245 | + ], | |
| 246 | + [ | |
| 247 | + 'id' => 656, | |
| 248 | + 'user_id' => 2, | |
| 249 | + 'behavior_id' => 122, | |
| 250 | + 'user_behavior_id' => 831, | |
| 251 | + 'question' => 1, | |
| 252 | + 'answer' => 'iuyb', | |
| 253 | + 'date' => '2016-09-10 19:27:43', | |
| 254 | + 'behavior' => | |
| 255 | + [ | |
| 256 | + 'id' => 122, | |
| 257 | + 'name' => 'returning to the place you swore you would never go again', | |
| 258 | + 'category_id' => 7, | |
| 259 | + ], | |
| 260 | + ], | |
| 261 | + [ | |
| 262 | + 'id' => 657, | |
| 263 | + 'user_id' => 2, | |
| 264 | + 'behavior_id' => 122, | |
| 265 | + 'user_behavior_id' => 831, | |
| 266 | + 'question' => 2, | |
| 267 | + 'answer' => 'iuyb', | |
| 268 | + 'date' => '2016-09-10 19:27:43', | |
| 269 | + 'behavior' => | |
| 270 | + [ | |
| 271 | + 'id' => 122, | |
| 272 | + 'name' => 'returning to the place you swore you would never go again', | |
| 273 | + 'category_id' => 7, | |
| 274 | + ], | |
| 275 | + ], | |
| 276 | + [ | |
| 277 | + 'id' => 658, | |
| 278 | + 'user_id' => 2, | |
| 279 | + 'behavior_id' => 122, | |
| 280 | + 'user_behavior_id' => 831, | |
| 281 | + 'question' => 3, | |
| 282 | + 'answer' => 'liuyb', | |
| 283 | + 'date' => '2016-09-10 19:27:43', | |
| 284 | + 'behavior' => | |
| 285 | + [ | |
| 286 | + 'id' => 122, | |
| 287 | + 'name' => 'returning to the place you swore you would never go again', | |
| 288 | + 'category_id' => 7, | |
| 289 | + ], | |
| 290 | + ], | |
| 291 | 291 | ]; | 
| 292 | 292 | public $userQuestions = [ | 
| 293 | - 13 => [ | |
| 294 | - 'question' => [ | |
| 295 | - 'id' => 13, | |
| 296 | - 'title' => 'less time/energy for God, meetings, and church', | |
| 297 | - ], | |
| 298 | - 'answers' => [ | |
| 299 | - [ | |
| 300 | - 'title' => 'How does it affect me? How do I act and feel?', | |
| 301 | - 'answer' => 'alsgn', | |
| 302 | - ], [ | |
| 303 | - 'title' => 'How does it affect the important people in my life?', | |
| 304 | - 'answer' => 'loiun', | |
| 305 | - ], [ | |
| 306 | - 'title' => 'Why do I do this? What is the benefit for me?', | |
| 307 | - 'answer' => 'liun', | |
| 308 | - ], | |
| 309 | - ], | |
| 310 | - ], | |
| 311 | - 29 => [ | |
| 312 | - 'question' => [ | |
| 313 | - 'id' => 29, | |
| 314 | - 'title' => 'using profanity', | |
| 315 | - ], | |
| 316 | - 'answers' => [ | |
| 317 | - [ | |
| 318 | - 'title' => 'How does it affect me? How do I act and feel?', | |
| 319 | - 'answer' => 'ljnb', | |
| 320 | - ], [ | |
| 321 | - 'title' => 'How does it affect the important people in my life?', | |
| 322 | - 'answer' => 'liunb', | |
| 323 | - ], [ | |
| 324 | - 'title' => 'Why do I do this? What is the benefit for me?', | |
| 325 | - 'answer' => 'ilub ', | |
| 326 | - ], | |
| 327 | - ], | |
| 328 | - ], | |
| 329 | - 48 => [ | |
| 330 | - 'question' => [ | |
| 331 | - 'id' => 48, | |
| 332 | - 'title' => 'workaholic', | |
| 333 | - ], | |
| 334 | - 'answers' => [ | |
| 335 | - [ | |
| 336 | - 'title' => 'How does it affect me? How do I act and feel?', | |
| 337 | - 'answer' => 'liub', | |
| 338 | - ], [ | |
| 339 | - 'title' => 'How does it affect the important people in my life?', | |
| 340 | - 'answer' => 'liub', | |
| 341 | - ], [ | |
| 342 | - 'title' => 'Why do I do this? What is the benefit for me?', | |
| 343 | - 'answer' => 'liub ', | |
| 344 | - ], | |
| 345 | - ], | |
| 346 | - ], | |
| 347 | - 89 => [ | |
| 348 | - 'question' => [ | |
| 349 | - 'id' => 89, | |
| 350 | - 'title' => 'obsessive (stuck) thoughts', | |
| 351 | - ], | |
| 352 | - 'answers' => [ | |
| 353 | - [ | |
| 354 | - 'title' => 'How does it affect me? How do I act and feel?', | |
| 355 | - 'answer' => 'liub', | |
| 356 | - ], [ | |
| 357 | - 'title' => 'How does it affect the important people in my life?', | |
| 358 | - 'answer' => 'liuby', | |
| 359 | - ], [ | |
| 360 | - 'title' => 'Why do I do this? What is the benefit for me?', | |
| 361 | - 'answer' => 'uiylb', | |
| 362 | - ], | |
| 363 | - ], | |
| 364 | - ], | |
| 365 | - 111 => [ | |
| 366 | - 'question' => [ | |
| 367 | - 'id' => 111, | |
| 368 | - 'title' => 'seeking out old unhealthy people and places', | |
| 369 | - ], | |
| 370 | - 'answers' => [ | |
| 371 | - [ | |
| 372 | - 'title' => 'How does it affect me? How do I act and feel?', | |
| 373 | - 'answer' => 'liub', | |
| 374 | - ], [ | |
| 375 | - 'title' => 'How does it affect the important people in my life?', | |
| 376 | - 'answer' => 'liuyb', | |
| 377 | - ], [ | |
| 378 | - 'title' => 'Why do I do this? What is the benefit for me?', | |
| 379 | - 'answer' => 'iuyb', | |
| 380 | - ], | |
| 381 | - ], | |
| 382 | - ], | |
| 383 | - 122 => [ | |
| 384 | - 'question' => [ | |
| 385 | - 'id' => 122, | |
| 386 | - 'title' => 'returning to the place you swore you would never go again', | |
| 387 | - ], | |
| 388 | - 'answers' => [ | |
| 389 | - [ | |
| 390 | - 'title' => 'How does it affect me? How do I act and feel?', | |
| 391 | - 'answer' => 'iuyb', | |
| 392 | - ], [ | |
| 393 | - 'title' => 'How does it affect the important people in my life?', | |
| 394 | - 'answer' => 'iuyb', | |
| 395 | - ], [ | |
| 396 | - 'title' => 'Why do I do this? What is the benefit for me?', | |
| 397 | - 'answer' => 'liuyb', | |
| 398 | - ], | |
| 399 | - ], | |
| 400 | - ], | |
| 293 | + 13 => [ | |
| 294 | + 'question' => [ | |
| 295 | + 'id' => 13, | |
| 296 | + 'title' => 'less time/energy for God, meetings, and church', | |
| 297 | + ], | |
| 298 | + 'answers' => [ | |
| 299 | + [ | |
| 300 | + 'title' => 'How does it affect me? How do I act and feel?', | |
| 301 | + 'answer' => 'alsgn', | |
| 302 | + ], [ | |
| 303 | + 'title' => 'How does it affect the important people in my life?', | |
| 304 | + 'answer' => 'loiun', | |
| 305 | + ], [ | |
| 306 | + 'title' => 'Why do I do this? What is the benefit for me?', | |
| 307 | + 'answer' => 'liun', | |
| 308 | + ], | |
| 309 | + ], | |
| 310 | + ], | |
| 311 | + 29 => [ | |
| 312 | + 'question' => [ | |
| 313 | + 'id' => 29, | |
| 314 | + 'title' => 'using profanity', | |
| 315 | + ], | |
| 316 | + 'answers' => [ | |
| 317 | + [ | |
| 318 | + 'title' => 'How does it affect me? How do I act and feel?', | |
| 319 | + 'answer' => 'ljnb', | |
| 320 | + ], [ | |
| 321 | + 'title' => 'How does it affect the important people in my life?', | |
| 322 | + 'answer' => 'liunb', | |
| 323 | + ], [ | |
| 324 | + 'title' => 'Why do I do this? What is the benefit for me?', | |
| 325 | + 'answer' => 'ilub ', | |
| 326 | + ], | |
| 327 | + ], | |
| 328 | + ], | |
| 329 | + 48 => [ | |
| 330 | + 'question' => [ | |
| 331 | + 'id' => 48, | |
| 332 | + 'title' => 'workaholic', | |
| 333 | + ], | |
| 334 | + 'answers' => [ | |
| 335 | + [ | |
| 336 | + 'title' => 'How does it affect me? How do I act and feel?', | |
| 337 | + 'answer' => 'liub', | |
| 338 | + ], [ | |
| 339 | + 'title' => 'How does it affect the important people in my life?', | |
| 340 | + 'answer' => 'liub', | |
| 341 | + ], [ | |
| 342 | + 'title' => 'Why do I do this? What is the benefit for me?', | |
| 343 | + 'answer' => 'liub ', | |
| 344 | + ], | |
| 345 | + ], | |
| 346 | + ], | |
| 347 | + 89 => [ | |
| 348 | + 'question' => [ | |
| 349 | + 'id' => 89, | |
| 350 | + 'title' => 'obsessive (stuck) thoughts', | |
| 351 | + ], | |
| 352 | + 'answers' => [ | |
| 353 | + [ | |
| 354 | + 'title' => 'How does it affect me? How do I act and feel?', | |
| 355 | + 'answer' => 'liub', | |
| 356 | + ], [ | |
| 357 | + 'title' => 'How does it affect the important people in my life?', | |
| 358 | + 'answer' => 'liuby', | |
| 359 | + ], [ | |
| 360 | + 'title' => 'Why do I do this? What is the benefit for me?', | |
| 361 | + 'answer' => 'uiylb', | |
| 362 | + ], | |
| 363 | + ], | |
| 364 | + ], | |
| 365 | + 111 => [ | |
| 366 | + 'question' => [ | |
| 367 | + 'id' => 111, | |
| 368 | + 'title' => 'seeking out old unhealthy people and places', | |
| 369 | + ], | |
| 370 | + 'answers' => [ | |
| 371 | + [ | |
| 372 | + 'title' => 'How does it affect me? How do I act and feel?', | |
| 373 | + 'answer' => 'liub', | |
| 374 | + ], [ | |
| 375 | + 'title' => 'How does it affect the important people in my life?', | |
| 376 | + 'answer' => 'liuyb', | |
| 377 | + ], [ | |
| 378 | + 'title' => 'Why do I do this? What is the benefit for me?', | |
| 379 | + 'answer' => 'iuyb', | |
| 380 | + ], | |
| 381 | + ], | |
| 382 | + ], | |
| 383 | + 122 => [ | |
| 384 | + 'question' => [ | |
| 385 | + 'id' => 122, | |
| 386 | + 'title' => 'returning to the place you swore you would never go again', | |
| 387 | + ], | |
| 388 | + 'answers' => [ | |
| 389 | + [ | |
| 390 | + 'title' => 'How does it affect me? How do I act and feel?', | |
| 391 | + 'answer' => 'iuyb', | |
| 392 | + ], [ | |
| 393 | + 'title' => 'How does it affect the important people in my life?', | |
| 394 | + 'answer' => 'iuyb', | |
| 395 | + ], [ | |
| 396 | + 'title' => 'Why do I do this? What is the benefit for me?', | |
| 397 | + 'answer' => 'liuyb', | |
| 398 | + ], | |
| 399 | + ], | |
| 400 | + ], | |
| 401 | 401 | ]; | 
| 402 | 402 | |
| 403 | 403 | public $behaviorData = [ | 
| 404 | - [ | |
| 405 | - 'id' => 820, | |
| 406 | - 'user_id' => 2, | |
| 407 | - 'behavior_id' => 7, | |
| 408 | - 'date' => '2016-09-10 19:26:04', | |
| 409 | - 'behavior' => [ | |
| 410 | - 'id' => 7, | |
| 411 | - 'name' => 'making eye contact', | |
| 412 | - 'category_id' => 1, | |
| 413 | - 'category' => [ | |
| 414 | - 'id' => 1, | |
| 415 | - 'name' => 'Restoration', | |
| 416 | - 'weight' => '0', | |
| 417 | - ], | |
| 418 | - ], | |
| 419 | - ], [ | |
| 420 | - 'id' => 821, | |
| 421 | - 'user_id' => 2, | |
| 422 | - 'behavior_id' => 13, | |
| 423 | - 'date' => '2016-09-10 19:26:04', | |
| 424 | - 'behavior' => [ | |
| 425 | - 'id' => 13, | |
| 426 | - 'name' => 'less time/energy for God, meetings, and church', | |
| 427 | - 'category_id' => 2, | |
| 428 | - 'category' => [ | |
| 429 | - 'id' => 2, | |
| 430 | - 'name' => 'Forgetting Priorities', | |
| 431 | - 'weight' => '0.016', | |
| 432 | - ], | |
| 433 | - ], | |
| 434 | - ], [ | |
| 435 | - 'id' => 822, | |
| 436 | - 'user_id' => 2, | |
| 437 | - 'behavior_id' => 18, | |
| 438 | - 'date' => '2016-09-10 19:26:04', | |
| 439 | - 'behavior' => [ | |
| 440 | - 'id' => 18, | |
| 441 | - 'name' => 'changes in goals', | |
| 442 | - 'category_id' => 2, | |
| 443 | - 'category' => [ | |
| 444 | - 'id' => 2, | |
| 445 | - 'name' => 'Forgetting Priorities', | |
| 446 | - 'weight' => '0.016', | |
| 447 | - ], | |
| 448 | - ], | |
| 449 | - ], [ | |
| 450 | - 'id' => 823, | |
| 451 | - 'user_id' => 2, | |
| 452 | - 'behavior_id' => 29, | |
| 453 | - 'date' => '2016-09-10 19:26:04', | |
| 454 | - 'behavior' => [ | |
| 455 | - 'id' => 29, | |
| 456 | - 'name' => 'using profanity', | |
| 457 | - 'category_id' => 3, | |
| 458 | - 'category' => [ | |
| 459 | - 'id' => 3, | |
| 460 | - 'name' => 'Anxiety', | |
| 461 | - 'weight' => '0.032', | |
| 462 | - ], | |
| 463 | - ], | |
| 464 | - ], [ | |
| 465 | - 'id' => 824, | |
| 466 | - 'user_id' => 2, | |
| 467 | - 'behavior_id' => 41, | |
| 468 | - 'date' => '2016-09-10 19:26:04', | |
| 469 | - 'behavior' => [ | |
| 470 | - 'id' => 41, | |
| 471 | - 'name' => 'co-dependent rescuing', | |
| 472 | - 'category_id' => 3, | |
| 473 | - 'category' => [ | |
| 474 | - 'id' => 3, | |
| 475 | - 'name' => 'Anxiety', | |
| 476 | - 'weight' => '0.032', | |
| 477 | - ], | |
| 478 | - ], | |
| 479 | - ], [ | |
| 480 | - 'id' => 825, | |
| 481 | - 'user_id' => 2, | |
| 482 | - 'behavior_id' => 48, | |
| 483 | - 'date' => '2016-09-10 19:26:04', | |
| 484 | - 'behavior' => [ | |
| 485 | - 'id' => 48, | |
| 486 | - 'name' => 'workaholic', | |
| 487 | - 'category_id' => 4, | |
| 488 | - 'category' => [ | |
| 489 | - 'id' => 4, | |
| 490 | - 'name' => 'Speeding Up', | |
| 491 | - 'weight' => '0.064', | |
| 492 | - ], | |
| 493 | - ], | |
| 494 | - ], [ | |
| 495 | - 'id' => 826, | |
| 496 | - 'user_id' => 2, | |
| 497 | - 'behavior_id' => 72, | |
| 498 | - 'date' => '2016-09-10 19:26:04', | |
| 499 | - 'behavior' => [ | |
| 500 | - 'id' => 72, | |
| 501 | - 'name' => 'black and white, all or nothing thinking', | |
| 502 | - 'category_id' => 5, | |
| 503 | - 'category' => [ | |
| 504 | - 'id' => 5, | |
| 505 | - 'name' => 'Ticked Off', | |
| 506 | - 'weight' => '0.128', | |
| 507 | - ], | |
| 508 | - ], | |
| 509 | - ], [ | |
| 510 | - 'id' => 827, | |
| 511 | - 'user_id' => 2, | |
| 512 | - 'behavior_id' => 79, | |
| 513 | - 'date' => '2016-09-10 19:26:04', | |
| 514 | - 'behavior' => [ | |
| 515 | - 'id' => 79, | |
| 516 | - 'name' => 'blaming', | |
| 517 | - 'category_id' => 5, | |
| 518 | - 'category' => [ | |
| 519 | - 'id' => 5, | |
| 520 | - 'name' => 'Ticked Off', | |
| 521 | - 'weight' => '0.128', | |
| 522 | - ], | |
| 523 | - ], | |
| 524 | - ], [ | |
| 525 | - 'id' => 828, | |
| 526 | - 'user_id' => 2, | |
| 527 | - 'behavior_id' => 89, | |
| 528 | - 'date' => '2016-09-10 19:26:04', | |
| 529 | - 'behavior' => [ | |
| 530 | - 'id' => 89, | |
| 531 | - 'name' => 'obsessive (stuck) thoughts', | |
| 532 | - 'category_id' => 5, | |
| 533 | - 'category' => [ | |
| 534 | - 'id' => 5, | |
| 535 | - 'name' => 'Ticked Off', | |
| 536 | - 'weight' => '0.128', | |
| 537 | - ], | |
| 538 | - ], | |
| 539 | - ], [ | |
| 540 | - 'id' => 829, | |
| 541 | - 'user_id' => 2, | |
| 542 | - 'behavior_id' => 111, | |
| 543 | - 'date' => '2016-09-10 19:26:04', | |
| 544 | - 'behavior' => [ | |
| 545 | - 'id' => 111, | |
| 546 | - 'name' => 'seeking out old unhealthy people and places', | |
| 547 | - 'category_id' => 6, | |
| 548 | - 'category' => [ | |
| 549 | - 'id' => 6, | |
| 550 | - 'name' => 'Exhausted', | |
| 551 | - 'weight' => '0.256', | |
| 552 | - ], | |
| 553 | - ], | |
| 554 | - ], [ | |
| 555 | - 'id' => 830, | |
| 556 | - 'user_id' => 2, | |
| 557 | - 'behavior_id' => 118, | |
| 558 | - 'date' => '2016-09-10 19:26:04', | |
| 559 | - 'behavior' => [ | |
| 560 | - 'id' => 118, | |
| 561 | - 'name' => 'not returning phone calls', | |
| 562 | - 'category_id' => 6, | |
| 563 | - 'category' => [ | |
| 564 | - 'id' => 6, | |
| 565 | - 'name' => 'Exhausted', | |
| 566 | - 'weight' => '0.256', | |
| 567 | - ], | |
| 568 | - ], | |
| 569 | - ], [ | |
| 570 | - 'id' => 831, | |
| 571 | - 'user_id' => 2, | |
| 572 | - 'behavior_id' => 122, | |
| 573 | - 'date' => '2016-09-10 19:26:04', | |
| 574 | - 'behavior' => [ | |
| 575 | - 'id' => 122, | |
| 576 | - 'name' => 'returning to the place you swore you would never go again', | |
| 577 | - 'category_id' => 7, | |
| 578 | - 'category' => [ | |
| 579 | - 'id' => 7, | |
| 580 | - 'name' => 'Relapse/Moral Failure', | |
| 581 | - 'weight' => '0.512', | |
| 582 | - ], | |
| 583 | - ], | |
| 584 | - ], | |
| 404 | + [ | |
| 405 | + 'id' => 820, | |
| 406 | + 'user_id' => 2, | |
| 407 | + 'behavior_id' => 7, | |
| 408 | + 'date' => '2016-09-10 19:26:04', | |
| 409 | + 'behavior' => [ | |
| 410 | + 'id' => 7, | |
| 411 | + 'name' => 'making eye contact', | |
| 412 | + 'category_id' => 1, | |
| 413 | + 'category' => [ | |
| 414 | + 'id' => 1, | |
| 415 | + 'name' => 'Restoration', | |
| 416 | + 'weight' => '0', | |
| 417 | + ], | |
| 418 | + ], | |
| 419 | + ], [ | |
| 420 | + 'id' => 821, | |
| 421 | + 'user_id' => 2, | |
| 422 | + 'behavior_id' => 13, | |
| 423 | + 'date' => '2016-09-10 19:26:04', | |
| 424 | + 'behavior' => [ | |
| 425 | + 'id' => 13, | |
| 426 | + 'name' => 'less time/energy for God, meetings, and church', | |
| 427 | + 'category_id' => 2, | |
| 428 | + 'category' => [ | |
| 429 | + 'id' => 2, | |
| 430 | + 'name' => 'Forgetting Priorities', | |
| 431 | + 'weight' => '0.016', | |
| 432 | + ], | |
| 433 | + ], | |
| 434 | + ], [ | |
| 435 | + 'id' => 822, | |
| 436 | + 'user_id' => 2, | |
| 437 | + 'behavior_id' => 18, | |
| 438 | + 'date' => '2016-09-10 19:26:04', | |
| 439 | + 'behavior' => [ | |
| 440 | + 'id' => 18, | |
| 441 | + 'name' => 'changes in goals', | |
| 442 | + 'category_id' => 2, | |
| 443 | + 'category' => [ | |
| 444 | + 'id' => 2, | |
| 445 | + 'name' => 'Forgetting Priorities', | |
| 446 | + 'weight' => '0.016', | |
| 447 | + ], | |
| 448 | + ], | |
| 449 | + ], [ | |
| 450 | + 'id' => 823, | |
| 451 | + 'user_id' => 2, | |
| 452 | + 'behavior_id' => 29, | |
| 453 | + 'date' => '2016-09-10 19:26:04', | |
| 454 | + 'behavior' => [ | |
| 455 | + 'id' => 29, | |
| 456 | + 'name' => 'using profanity', | |
| 457 | + 'category_id' => 3, | |
| 458 | + 'category' => [ | |
| 459 | + 'id' => 3, | |
| 460 | + 'name' => 'Anxiety', | |
| 461 | + 'weight' => '0.032', | |
| 462 | + ], | |
| 463 | + ], | |
| 464 | + ], [ | |
| 465 | + 'id' => 824, | |
| 466 | + 'user_id' => 2, | |
| 467 | + 'behavior_id' => 41, | |
| 468 | + 'date' => '2016-09-10 19:26:04', | |
| 469 | + 'behavior' => [ | |
| 470 | + 'id' => 41, | |
| 471 | + 'name' => 'co-dependent rescuing', | |
| 472 | + 'category_id' => 3, | |
| 473 | + 'category' => [ | |
| 474 | + 'id' => 3, | |
| 475 | + 'name' => 'Anxiety', | |
| 476 | + 'weight' => '0.032', | |
| 477 | + ], | |
| 478 | + ], | |
| 479 | + ], [ | |
| 480 | + 'id' => 825, | |
| 481 | + 'user_id' => 2, | |
| 482 | + 'behavior_id' => 48, | |
| 483 | + 'date' => '2016-09-10 19:26:04', | |
| 484 | + 'behavior' => [ | |
| 485 | + 'id' => 48, | |
| 486 | + 'name' => 'workaholic', | |
| 487 | + 'category_id' => 4, | |
| 488 | + 'category' => [ | |
| 489 | + 'id' => 4, | |
| 490 | + 'name' => 'Speeding Up', | |
| 491 | + 'weight' => '0.064', | |
| 492 | + ], | |
| 493 | + ], | |
| 494 | + ], [ | |
| 495 | + 'id' => 826, | |
| 496 | + 'user_id' => 2, | |
| 497 | + 'behavior_id' => 72, | |
| 498 | + 'date' => '2016-09-10 19:26:04', | |
| 499 | + 'behavior' => [ | |
| 500 | + 'id' => 72, | |
| 501 | + 'name' => 'black and white, all or nothing thinking', | |
| 502 | + 'category_id' => 5, | |
| 503 | + 'category' => [ | |
| 504 | + 'id' => 5, | |
| 505 | + 'name' => 'Ticked Off', | |
| 506 | + 'weight' => '0.128', | |
| 507 | + ], | |
| 508 | + ], | |
| 509 | + ], [ | |
| 510 | + 'id' => 827, | |
| 511 | + 'user_id' => 2, | |
| 512 | + 'behavior_id' => 79, | |
| 513 | + 'date' => '2016-09-10 19:26:04', | |
| 514 | + 'behavior' => [ | |
| 515 | + 'id' => 79, | |
| 516 | + 'name' => 'blaming', | |
| 517 | + 'category_id' => 5, | |
| 518 | + 'category' => [ | |
| 519 | + 'id' => 5, | |
| 520 | + 'name' => 'Ticked Off', | |
| 521 | + 'weight' => '0.128', | |
| 522 | + ], | |
| 523 | + ], | |
| 524 | + ], [ | |
| 525 | + 'id' => 828, | |
| 526 | + 'user_id' => 2, | |
| 527 | + 'behavior_id' => 89, | |
| 528 | + 'date' => '2016-09-10 19:26:04', | |
| 529 | + 'behavior' => [ | |
| 530 | + 'id' => 89, | |
| 531 | + 'name' => 'obsessive (stuck) thoughts', | |
| 532 | + 'category_id' => 5, | |
| 533 | + 'category' => [ | |
| 534 | + 'id' => 5, | |
| 535 | + 'name' => 'Ticked Off', | |
| 536 | + 'weight' => '0.128', | |
| 537 | + ], | |
| 538 | + ], | |
| 539 | + ], [ | |
| 540 | + 'id' => 829, | |
| 541 | + 'user_id' => 2, | |
| 542 | + 'behavior_id' => 111, | |
| 543 | + 'date' => '2016-09-10 19:26:04', | |
| 544 | + 'behavior' => [ | |
| 545 | + 'id' => 111, | |
| 546 | + 'name' => 'seeking out old unhealthy people and places', | |
| 547 | + 'category_id' => 6, | |
| 548 | + 'category' => [ | |
| 549 | + 'id' => 6, | |
| 550 | + 'name' => 'Exhausted', | |
| 551 | + 'weight' => '0.256', | |
| 552 | + ], | |
| 553 | + ], | |
| 554 | + ], [ | |
| 555 | + 'id' => 830, | |
| 556 | + 'user_id' => 2, | |
| 557 | + 'behavior_id' => 118, | |
| 558 | + 'date' => '2016-09-10 19:26:04', | |
| 559 | + 'behavior' => [ | |
| 560 | + 'id' => 118, | |
| 561 | + 'name' => 'not returning phone calls', | |
| 562 | + 'category_id' => 6, | |
| 563 | + 'category' => [ | |
| 564 | + 'id' => 6, | |
| 565 | + 'name' => 'Exhausted', | |
| 566 | + 'weight' => '0.256', | |
| 567 | + ], | |
| 568 | + ], | |
| 569 | + ], [ | |
| 570 | + 'id' => 831, | |
| 571 | + 'user_id' => 2, | |
| 572 | + 'behavior_id' => 122, | |
| 573 | + 'date' => '2016-09-10 19:26:04', | |
| 574 | + 'behavior' => [ | |
| 575 | + 'id' => 122, | |
| 576 | + 'name' => 'returning to the place you swore you would never go again', | |
| 577 | + 'category_id' => 7, | |
| 578 | + 'category' => [ | |
| 579 | + 'id' => 7, | |
| 580 | + 'name' => 'Relapse/Moral Failure', | |
| 581 | + 'weight' => '0.512', | |
| 582 | + ], | |
| 583 | + ], | |
| 584 | + ], | |
| 585 | 585 | ]; | 
| 586 | 586 | |
| 587 | 587 | public $userBehaviors = [ | 
| 588 | - 1 => [ | |
| 589 | - 'category_name' => 'Restoration', | |
| 590 | - 'behaviors' => [ | |
| 591 | - [ | |
| 592 | - 'id' => 7, | |
| 593 | - 'name' => 'making eye contact', | |
| 594 | - ], | |
| 595 | - ], | |
| 596 | - ], | |
| 597 | - 2 => [ | |
| 598 | - 'category_name' => 'Forgetting Priorities', | |
| 599 | - 'behaviors' => [ | |
| 600 | - [ | |
| 601 | - 'id' => 13, | |
| 602 | - 'name' => 'less time/energy for God, meetings, and church', | |
| 603 | - ], [ | |
| 604 | - 'id' => 18, | |
| 605 | - 'name' => 'changes in goals', | |
| 606 | - ], | |
| 607 | - ], | |
| 588 | + 1 => [ | |
| 589 | + 'category_name' => 'Restoration', | |
| 590 | + 'behaviors' => [ | |
| 591 | + [ | |
| 592 | + 'id' => 7, | |
| 593 | + 'name' => 'making eye contact', | |
| 594 | + ], | |
| 595 | + ], | |
| 596 | + ], | |
| 597 | + 2 => [ | |
| 598 | + 'category_name' => 'Forgetting Priorities', | |
| 599 | + 'behaviors' => [ | |
| 600 | + [ | |
| 601 | + 'id' => 13, | |
| 602 | + 'name' => 'less time/energy for God, meetings, and church', | |
| 603 | + ], [ | |
| 604 | + 'id' => 18, | |
| 605 | + 'name' => 'changes in goals', | |
| 606 | + ], | |
| 607 | + ], | |
| 608 | 608 | ], | 
| 609 | 609 | 3 => [ | 
| 610 | - 'category_name' => 'Anxiety', | |
| 611 | - 'behaviors' => [ | |
| 612 | - [ | |
| 613 | - 'id' => 29, | |
| 614 | - 'name' => 'using profanity', | |
| 615 | - ], [ | |
| 616 | - 'id' => 41, | |
| 617 | - 'name' => 'co-dependent rescuing', | |
| 618 | - ], | |
| 619 | - ], | |
| 620 | - ], | |
| 621 | - 4 => [ | |
| 622 | - 'category_name' => 'Speeding Up', | |
| 623 | - 'behaviors' => [ | |
| 624 | - [ | |
| 625 | - 'id' => 48, | |
| 626 | - 'name' => 'workaholic', | |
| 627 | - ], | |
| 628 | - ], | |
| 629 | - ], | |
| 630 | - 5 => [ | |
| 631 | - 'category_name' => 'Ticked Off', | |
| 632 | - 'behaviors' => [ | |
| 633 | - [ | |
| 634 | - 'id' => 72, | |
| 635 | - 'name' => 'black and white, all or nothing thinking', | |
| 636 | - ], [ | |
| 637 | - 'id' => 79, | |
| 638 | - 'name' => 'blaming', | |
| 639 | - ], [ | |
| 640 | - 'id' => 89, | |
| 641 | - 'name' => 'obsessive (stuck) thoughts', | |
| 642 | - ], | |
| 643 | - ], | |
| 644 | - ], | |
| 645 | - 6 => [ | |
| 646 | - 'category_name' => 'Exhausted', | |
| 647 | - 'behaviors' => [ | |
| 648 | - [ | |
| 649 | - 'id' => 111, | |
| 650 | - 'name' => 'seeking out old unhealthy people and places', | |
| 651 | - ], [ | |
| 652 | - 'id' => 118, | |
| 653 | - 'name' => 'not returning phone calls', | |
| 654 | - ], | |
| 655 | - ], | |
| 656 | - ], | |
| 657 | - 7 => [ | |
| 658 | - 'category_name' => 'Relapse/Moral Failure', | |
| 659 | - 'behaviors' => [ | |
| 660 | - [ | |
| 661 | - 'id' => 122, | |
| 662 | - 'name' => 'returning to the place you swore you would never go again', | |
| 663 | - ], | |
| 664 | - ], | |
| 665 | - ], | |
| 610 | + 'category_name' => 'Anxiety', | |
| 611 | + 'behaviors' => [ | |
| 612 | + [ | |
| 613 | + 'id' => 29, | |
| 614 | + 'name' => 'using profanity', | |
| 615 | + ], [ | |
| 616 | + 'id' => 41, | |
| 617 | + 'name' => 'co-dependent rescuing', | |
| 618 | + ], | |
| 619 | + ], | |
| 620 | + ], | |
| 621 | + 4 => [ | |
| 622 | + 'category_name' => 'Speeding Up', | |
| 623 | + 'behaviors' => [ | |
| 624 | + [ | |
| 625 | + 'id' => 48, | |
| 626 | + 'name' => 'workaholic', | |
| 627 | + ], | |
| 628 | + ], | |
| 629 | + ], | |
| 630 | + 5 => [ | |
| 631 | + 'category_name' => 'Ticked Off', | |
| 632 | + 'behaviors' => [ | |
| 633 | + [ | |
| 634 | + 'id' => 72, | |
| 635 | + 'name' => 'black and white, all or nothing thinking', | |
| 636 | + ], [ | |
| 637 | + 'id' => 79, | |
| 638 | + 'name' => 'blaming', | |
| 639 | + ], [ | |
| 640 | + 'id' => 89, | |
| 641 | + 'name' => 'obsessive (stuck) thoughts', | |
| 642 | + ], | |
| 643 | + ], | |
| 644 | + ], | |
| 645 | + 6 => [ | |
| 646 | + 'category_name' => 'Exhausted', | |
| 647 | + 'behaviors' => [ | |
| 648 | + [ | |
| 649 | + 'id' => 111, | |
| 650 | + 'name' => 'seeking out old unhealthy people and places', | |
| 651 | + ], [ | |
| 652 | + 'id' => 118, | |
| 653 | + 'name' => 'not returning phone calls', | |
| 654 | + ], | |
| 655 | + ], | |
| 656 | + ], | |
| 657 | + 7 => [ | |
| 658 | + 'category_name' => 'Relapse/Moral Failure', | |
| 659 | + 'behaviors' => [ | |
| 660 | + [ | |
| 661 | + 'id' => 122, | |
| 662 | + 'name' => 'returning to the place you swore you would never go again', | |
| 663 | + ], | |
| 664 | + ], | |
| 665 | + ], | |
| 666 | 666 | ]; | 
| 667 | 667 | |
| 668 | 668 | public $exportData = [ | 
| @@ -741,7 +741,7 @@ discard block | ||
| 741 | 741 | $this->container = new \yii\di\Container; | 
| 742 | 742 |      $this->container->set('common\interfaces\UserInterface', '\site\tests\_support\MockUser'); | 
| 743 | 743 |      $this->container->set('common\interfaces\UserBehaviorInterface', '\site\tests\_support\MockUserBehavior'); | 
| 744 | -    $this->container->set('common\interfaces\TimeInterface', function () { | |
| 744 | +    $this->container->set('common\interfaces\TimeInterface', function() { | |
| 745 | 745 |        return new \common\components\Time('America/Los_Angeles'); | 
| 746 | 746 | }); | 
| 747 | 747 | |
| @@ -785,21 +785,21 @@ discard block | ||
| 785 | 785 | } | 
| 786 | 786 | |
| 787 | 787 |    public function testParseQuestionData() { | 
| 788 | -    $this->specify('parseQuestionData should function correctly', function () { | |
| 788 | +    $this->specify('parseQuestionData should function correctly', function() { | |
| 789 | 789 |        expect('parseQuestionData should return the correct structure with expected data', $this->assertEquals($this->user->parseQuestionData($this->questionData), $this->userQuestions)); | 
| 790 | 790 |        expect('parseQuestionData should return empty with the empty set', $this->assertEmpty($this->user->parseQuestionData([]))); | 
| 791 | 791 | }); | 
| 792 | 792 | } | 
| 793 | 793 | |
| 794 | 794 |    public function testParseBehaviorData() { | 
| 795 | -    $this->specify('parseBehaviorData should function correctly', function () { | |
| 795 | +    $this->specify('parseBehaviorData should function correctly', function() { | |
| 796 | 796 |        expect('parseBehaviorData should return the correct structure with expected data', $this->assertEquals($this->user->parseBehaviorData($this->behaviorData), $this->userBehaviors)); | 
| 797 | 797 |        expect('parseBehaviorData should return empty with the empty set', $this->assertEmpty($this->user->parseBehaviorData([]))); | 
| 798 | 798 | }); | 
| 799 | 799 | } | 
| 800 | 800 | |
| 801 | 801 |    public function testIsPartnerEnabled() { | 
| 802 | -    $this->specify('isPartnerEnabled should function correctly', function () { | |
| 802 | +    $this->specify('isPartnerEnabled should function correctly', function() { | |
| 803 | 803 |        expect('isPartnerEnabled should return false when no partners are set and email_threshold is null', $this->assertFalse($this->user->isPartnerEnabled())); | 
| 804 | 804 | |
| 805 | 805 | $this->user->email_threshold = 10; | 
| @@ -824,7 +824,7 @@ discard block | ||
| 824 | 824 | } | 
| 825 | 825 | |
| 826 | 826 |    public function testIsOverThreshold() { | 
| 827 | -    $this->specify('isOverThreshold should function correctly', function () { | |
| 827 | +    $this->specify('isOverThreshold should function correctly', function() { | |
| 828 | 828 |        expect('isOverThreshold should return false with no partners enabled', $this->assertFalse($this->user->isOverThreshold(5))); | 
| 829 | 829 | |
| 830 | 830 | $this->user->email_threshold = 10; | 
| @@ -837,7 +837,7 @@ discard block | ||
| 837 | 837 | } | 
| 838 | 838 | |
| 839 | 839 |    public function testIsTokenCurrent() { | 
| 840 | -    $this->specify('isTokenCurrent should function correctly', function () { | |
| 840 | +    $this->specify('isTokenCurrent should function correctly', function() { | |
| 841 | 841 | $good_token = \Yii::$app | 
| 842 | 842 | ->getSecurity() | 
| 843 | 843 | ->generateRandomString() . '_' . time(); | 
| @@ -859,7 +859,7 @@ discard block | ||
| 859 | 859 |    public function testConfirmVerifyEmailToken() { | 
| 860 | 860 | $this->user->verify_email_token = 'hello_world'; | 
| 861 | 861 | $this->user->confirmVerifyEmailToken(); | 
| 862 | -    expect('confirmVerifyEmailToken should append User::CONFIRMED_STRING to the end of the verify_email_token property', $this->assertEquals($this->user->verify_email_token, 'hello_world'.$this->user::CONFIRMED_STRING)); | |
| 862 | +    expect('confirmVerifyEmailToken should append User::CONFIRMED_STRING to the end of the verify_email_token property', $this->assertEquals($this->user->verify_email_token, 'hello_world' . $this->user::CONFIRMED_STRING)); | |
| 863 | 863 | } | 
| 864 | 864 | |
| 865 | 865 |    public function testIsVerified() { |