mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 05:47:30 -04:00 
			
		
		
		
	From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type: - `setUpBeforeClass()` - `setUp()` - `assertPreConditions()` - `assertPostConditions()` - `tearDown()` - `tearDownAfterClass()` - `onNotSuccessfulTest()` [1]: https://phpunit.de/announcements/phpunit-8.html
		
			
				
	
	
		
			48 lines
		
	
	
		
			983 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			983 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /**
 | |
|  * Invoice Ninja (https://invoiceninja.com).
 | |
|  *
 | |
|  * @link https://github.com/invoiceninja/invoiceninja source repository
 | |
|  *
 | |
|  * @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
 | |
|  *
 | |
|  * @license https://www.elastic.co/licensing/elastic-license
 | |
|  */
 | |
| 
 | |
| namespace Tests\Integration;
 | |
| 
 | |
| use Illuminate\Foundation\Testing\DatabaseTransactions;
 | |
| use Illuminate\Support\Facades\Cache;
 | |
| use Tests\MockAccountData;
 | |
| use Tests\TestCase;
 | |
| 
 | |
| /**
 | |
|  * @test
 | |
|  */
 | |
| class CheckCacheTest extends TestCase
 | |
| {
 | |
|     use MockAccountData;
 | |
|     use DatabaseTransactions;
 | |
| 
 | |
|     protected function setUp() :void
 | |
|     {
 | |
|         parent::setUp();
 | |
| 
 | |
|         $this->makeTestData();
 | |
|     }
 | |
| 
 | |
|     public function testWarmedUpCache()
 | |
|     {
 | |
|         $date_formats = Cache::get('date_formats');
 | |
| 
 | |
|         $this->assertNotNull($date_formats);
 | |
|     }
 | |
| 
 | |
|     public function testCacheCount()
 | |
|     {
 | |
|         $date_formats = Cache::get('date_formats');
 | |
| 
 | |
|         $this->assertEquals(14, count($date_formats));
 | |
|     }
 | |
| }
 |