| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | <?php | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * ExpenseControllerTest.php | 
					
						
							|  |  |  |  * Copyright (c) 2017 thegrumpydictator@gmail.com | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This file is part of Firefly III. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Firefly III is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License as published by | 
					
						
							|  |  |  |  * the Free Software Foundation, either version 3 of the License, or | 
					
						
							|  |  |  |  * (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Firefly III is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  |  * along with Firefly III. If not, see <http://www.gnu.org/licenses/>. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | declare(strict_types=1); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Tests\Feature\Controllers\Report; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  | use Amount; | 
					
						
							| 
									
										
										
										
											2018-12-12 20:30:25 +01:00
										 |  |  | use Carbon\Carbon; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  | use FireflyIII\Helpers\Collector\GroupCollectorInterface; | 
					
						
							| 
									
										
										
										
											2019-06-23 10:40:46 +02:00
										 |  |  | use FireflyIII\Helpers\Fiscal\FiscalHelperInterface; | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | use FireflyIII\Models\AccountType; | 
					
						
							|  |  |  | use FireflyIII\Repositories\Account\AccountRepositoryInterface; | 
					
						
							| 
									
										
										
										
											2018-03-24 06:08:50 +01:00
										 |  |  | use Log; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  | use Preferences; | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | use Tests\TestCase; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							|  |  |  |  * Class ExpenseControllerTest | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * @SuppressWarnings(PHPMD.TooManyPublicMethods) | 
					
						
							|  |  |  |  * @SuppressWarnings(PHPMD.ExcessiveMethodLength) | 
					
						
							|  |  |  |  * @SuppressWarnings(PHPMD.CouplingBetweenObjects) | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | class ExpenseControllerTest extends TestCase | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2018-03-24 06:08:50 +01:00
										 |  |  |     /** | 
					
						
							|  |  |  |      * | 
					
						
							|  |  |  |      */ | 
					
						
							| 
									
										
										
										
											2018-09-02 20:27:26 +02:00
										 |  |  |     public function setUp(): void | 
					
						
							| 
									
										
										
										
											2018-03-24 06:08:50 +01:00
										 |  |  |     { | 
					
						
							|  |  |  |         parent::setUp(); | 
					
						
							| 
									
										
										
										
											2019-04-09 20:05:20 +02:00
										 |  |  |         Log::info(sprintf('Now in %s.', get_class($this))); | 
					
						
							| 
									
										
										
										
											2018-03-24 06:08:50 +01:00
										 |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-08-09 20:17:15 +02:00
										 |  |  |      * @covers \FireflyIII\Http\Controllers\Report\ExpenseController | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2018-05-11 19:58:10 +02:00
										 |  |  |     public function testBudget(): void | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2019-07-23 17:33:23 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $repository   = $this->mock(AccountRepositoryInterface::class); | 
					
						
							|  |  |  |         $fiscalHelper = $this->mock(FiscalHelperInterface::class); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector    = $this->mock(GroupCollectorInterface::class); | 
					
						
							|  |  |  |         $expense      = $this->getRandomExpense(); | 
					
						
							|  |  |  |         $revenue      = $this->getRandomRevenue(); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $date         = new Carbon; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $transactions = [$this->getRandomWithdrawalAsArray()]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->mockDefaultSession(); | 
					
						
							| 
									
										
										
										
											2019-07-24 19:02:41 +02:00
										 |  |  |         Preferences::shouldReceive('lastActivity')->atLeast()->once()->andReturn('md512345'); | 
					
						
							| 
									
										
										
										
											2018-12-12 20:30:25 +01:00
										 |  |  |         $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							|  |  |  |         $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |         $repository->shouldReceive('findByName')->once()->withArgs([$expense->name, [AccountType::REVENUE]])->andReturn($revenue); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         Amount::shouldReceive('formatAnything')->atLeast()->once()->andReturn('-100'); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         // dont care about any calls, just return a default set of fake transactions:
 | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector->shouldReceive('setRange')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setTypes')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setAccounts')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('withBudgetInformation')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('getExtractedJournals')->andReturn($transactions)->atLeast()->once(); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->be($this->user()); | 
					
						
							|  |  |  |         $response = $this->get(route('report-data.expense.budget', ['1', $expense->id, '20170101', '20170131'])); | 
					
						
							|  |  |  |         $response->assertStatus(200); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-08-09 20:17:15 +02:00
										 |  |  |      * @covers \FireflyIII\Http\Controllers\Report\ExpenseController | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2018-05-11 19:58:10 +02:00
										 |  |  |     public function testCategory(): void | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $repository   = $this->mock(AccountRepositoryInterface::class); | 
					
						
							|  |  |  |         $fiscalHelper = $this->mock(FiscalHelperInterface::class); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector    = $this->mock(GroupCollectorInterface::class); | 
					
						
							|  |  |  |         $expense      = $this->getRandomExpense(); | 
					
						
							|  |  |  |         $revenue      = $this->getRandomRevenue(); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $date         = new Carbon; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $one          = $this->getRandomWithdrawalAsArray(); | 
					
						
							|  |  |  |         $two          = $this->getRandomWithdrawalAsArray(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         // two categories
 | 
					
						
							|  |  |  |         $oneCat = $this->getRandomCategory(); | 
					
						
							|  |  |  |         $twoCat = $this->user()->categories()->where('id', '!=', $oneCat->id)->inRandomOrder()->first(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $one['category_id']   = $oneCat->id; | 
					
						
							|  |  |  |         $one['category_name'] = $oneCat->name; | 
					
						
							|  |  |  |         $two['category_id']   = $twoCat->id; | 
					
						
							|  |  |  |         $two['category_name'] = $twoCat->name; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->mockDefaultSession(); | 
					
						
							|  |  |  |         Preferences::shouldReceive('lastActivity')->atLeast()->once(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-12 20:30:25 +01:00
										 |  |  |         $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							|  |  |  |         $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |         $repository->shouldReceive('findByName')->once()->withArgs([$expense->name, [AccountType::REVENUE]])->andReturn($revenue); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         Amount::shouldReceive('formatAnything')->atLeast()->once()->andReturn('-100'); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector->shouldReceive('setRange')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setTypes')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setAccounts')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('withCategoryInformation')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('getExtractedJournals')->andReturn([$one], [$two])->atLeast()->once(); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         $this->be($this->user()); | 
					
						
							|  |  |  |         $response = $this->get(route('report-data.expense.category', ['1', $expense->id, '20170101', '20170131'])); | 
					
						
							|  |  |  |         $response->assertStatus(200); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-08-09 20:17:15 +02:00
										 |  |  |      * @covers \FireflyIII\Http\Controllers\Report\ExpenseController | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2018-05-11 19:58:10 +02:00
										 |  |  |     public function testSpent(): void | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $repository   = $this->mock(AccountRepositoryInterface::class); | 
					
						
							|  |  |  |         $fiscalHelper = $this->mock(FiscalHelperInterface::class); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector    = $this->mock(GroupCollectorInterface::class); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $expense      = $this->getRandomExpense(); | 
					
						
							|  |  |  |         $revenue      = $this->getRandomRevenue(); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $date         = new Carbon; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $transactions = [$this->getRandomWithdrawalAsArray()]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->mockDefaultSession(); | 
					
						
							|  |  |  |         Preferences::shouldReceive('lastActivity')->atLeast()->once(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-12 20:30:25 +01:00
										 |  |  |         $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							|  |  |  |         $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |         $repository->shouldReceive('findByName')->once()->withArgs([$expense->name, [AccountType::REVENUE]])->andReturn($revenue); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector->shouldReceive('setRange')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setTypes')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setAccounts')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('getExtractedJournals')->andReturn($transactions)->atLeast()->once(); | 
					
						
							|  |  |  |         Amount::shouldReceive('formatAnything')->atLeast()->once()->andReturn('-100'); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         $this->be($this->user()); | 
					
						
							|  |  |  |         $response = $this->get(route('report-data.expense.spent', ['1', $expense->id, '20170101', '20170131'])); | 
					
						
							|  |  |  |         $response->assertStatus(200); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-08-09 20:17:15 +02:00
										 |  |  |      * @covers \FireflyIII\Http\Controllers\Report\ExpenseController | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2018-05-11 19:58:10 +02:00
										 |  |  |     public function testTopExpense(): void | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         Log::debug(sprintf('Now in test %s', __METHOD__)); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $repository   = $this->mock(AccountRepositoryInterface::class); | 
					
						
							|  |  |  |         $fiscalHelper = $this->mock(FiscalHelperInterface::class); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector    = $this->mock(GroupCollectorInterface::class); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $expense      = $this->getRandomExpense(); | 
					
						
							|  |  |  |         $revenue      = $this->getRandomRevenue(); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $date         = new Carbon; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $transactions = [$this->getRandomWithdrawalAsArray()]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->mockDefaultSession(); | 
					
						
							|  |  |  |         Preferences::shouldReceive('lastActivity')->atLeast()->once(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-12 20:30:25 +01:00
										 |  |  |         $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							|  |  |  |         $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |         $repository->shouldReceive('findByName')->once()->withArgs([$expense->name, [AccountType::REVENUE]])->andReturn($revenue); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector->shouldReceive('setRange')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setTypes')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('withAccountInformation')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $collector->shouldReceive('setAccounts')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('getExtractedJournals')->andReturn($transactions)->atLeast()->once(); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |         $this->be($this->user()); | 
					
						
							|  |  |  |         $response = $this->get(route('report-data.expense.expenses', ['1', $expense->id, '20170101', '20170131'])); | 
					
						
							|  |  |  |         $response->assertStatus(200); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** | 
					
						
							| 
									
										
										
										
											2018-08-09 20:17:15 +02:00
										 |  |  |      * @covers \FireflyIII\Http\Controllers\Report\ExpenseController | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |      */ | 
					
						
							| 
									
										
										
										
											2018-05-11 19:58:10 +02:00
										 |  |  |     public function testTopIncome(): void | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |     { | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         Log::debug(sprintf('Now in test %s', __METHOD__)); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $repository   = $this->mock(AccountRepositoryInterface::class); | 
					
						
							|  |  |  |         $fiscalHelper = $this->mock(FiscalHelperInterface::class); | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector    = $this->mock(GroupCollectorInterface::class); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $expense      = $this->getRandomExpense(); | 
					
						
							|  |  |  |         $revenue      = $this->getRandomRevenue(); | 
					
						
							| 
									
										
										
										
											2019-04-09 15:32:48 +02:00
										 |  |  |         $date         = new Carbon; | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $transactions = [$this->getRandomWithdrawalAsArray()]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         $this->mockDefaultSession(); | 
					
						
							|  |  |  |         Preferences::shouldReceive('lastActivity')->atLeast()->once(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-12-12 20:30:25 +01:00
										 |  |  |         $fiscalHelper->shouldReceive('endOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							|  |  |  |         $fiscalHelper->shouldReceive('startOfFiscalYear')->atLeast()->once()->andReturn($date); | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |         $repository->shouldReceive('findByName')->once()->withArgs([$expense->name, [AccountType::REVENUE]])->andReturn($revenue); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-07-01 20:22:35 +02:00
										 |  |  |         $collector->shouldReceive('setRange')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setTypes')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('setAccounts')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('withAccountInformation')->andReturnSelf()->atLeast()->once(); | 
					
						
							|  |  |  |         $collector->shouldReceive('getExtractedJournals')->andReturn($transactions)->atLeast()->once(); | 
					
						
							| 
									
										
										
										
											2018-09-02 20:13:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-12-23 17:42:07 +01:00
										 |  |  |         $this->be($this->user()); | 
					
						
							|  |  |  |         $response = $this->get(route('report-data.expense.income', ['1', $expense->id, '20170101', '20170131'])); | 
					
						
							|  |  |  |         $response->assertStatus(200); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |