mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 18:54:58 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * HelpControllerTest.php
 | |
|  * Copyright (C) 2016 thegrumpydictator@gmail.com
 | |
|  *
 | |
|  * This software may be modified and distributed under the terms of the
 | |
|  * Creative Commons Attribution-ShareAlike 4.0 International License.
 | |
|  *
 | |
|  * See the LICENSE file for details.
 | |
|  */
 | |
| use FireflyIII\Helpers\Help\HelpInterface;
 | |
| 
 | |
| 
 | |
| /**
 | |
|  * Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:41.
 | |
|  */
 | |
| class HelpControllerTest extends TestCase
 | |
| {
 | |
| 
 | |
| 
 | |
|     /**
 | |
|      * Sets up the fixture, for example, opens a network connection.
 | |
|      * This method is called before a test is executed.
 | |
|      */
 | |
|     public function setUp()
 | |
|     {
 | |
|         parent::setUp();
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @covers \FireflyIII\Http\Controllers\HelpController::show
 | |
|      */
 | |
|     public function testShow()
 | |
|     {
 | |
|         $help = $this->mock(HelpInterface::class);
 | |
|         $help->shouldReceive('hasRoute')->andReturn(true)->once();
 | |
|         $help->shouldReceive('inCache')->andReturn(false)->once();
 | |
|         $help->shouldReceive('getFromGithub')->andReturn('Help content here.')->once();
 | |
|         $help->shouldReceive('putInCache')->once();
 | |
| 
 | |
|         $this->be($this->user());
 | |
|         $this->call('GET', route('help.show', ['index']));
 | |
|         $this->assertResponseStatus(200);
 | |
|     }
 | |
| }
 |