Skip to content

Commit

Permalink
Update tests to include artisan command, fix wrong tests
Browse files Browse the repository at this point in the history
  • Loading branch information
byErikas committed Feb 6, 2025
1 parent 6397255 commit 2350c4e
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 164 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"redis",
"tags"
],
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",
"require": {
"php": "^8.0",
Expand Down
1 change: 0 additions & 1 deletion src/Cache/Traits/MethodOverrides.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ public function rememberForever($key, Closure $callback)
return $value;
}


/**
* Increment the value of an item in the cache.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
|
*/

pest()->extend(Tests\TestCase::class)->in('Unit', 'Feature');
uses(Tests\TestCase::class)->in('Unit');

/*
|--------------------------------------------------------------------------
Expand Down
15 changes: 14 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,21 @@
namespace Tests;

use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Cache;
use \Illuminate\Contracts\Cache\Repository;
use Illuminate\Support\Str;

abstract class TestCase extends BaseTestCase
{
//
protected Repository $cache;

protected function cache(): Repository
{
return Cache::store("redis");
}

protected function key()
{
return Str::uuid();
}
}
Loading

0 comments on commit 2350c4e

Please sign in to comment.