-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c28ba82
commit 95f1146
Showing
4 changed files
with
30 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1 @@ | ||
<?php | ||
|
||
use Digitlimit\Alert\Helpers\Type; | ||
|
||
it('can get types from the config file', function () | ||
{ | ||
|
||
|
||
|
||
// expect(config('alert.types'))->toEqual($types); | ||
|
||
})->name('helpers', 'helpers-type-helper-types'); | ||
|
||
// use Exception; | ||
|
||
// class Type | ||
// { | ||
// const PREFIX = 'alert-'; | ||
|
||
// public static function types() : array | ||
// { | ||
// return config('alert.types'); | ||
// } | ||
|
||
// public static function prefixed(string $type) : string | ||
// { | ||
// return self::PREFIX . $type; | ||
// } | ||
|
||
// public static function exists(string $type) : bool | ||
// { | ||
// $types = self::types(); | ||
// return isset($types[$type]) || isset($types[self::prefixed($type)]); | ||
// } | ||
|
||
// public static function type(string $type) : array | ||
// { | ||
// $types = self::types(); | ||
// return $types[$type] ?? $types[self::prefixed($type)]; | ||
// } | ||
|
||
// public static function clasname(string $type) : string | ||
// { | ||
// if(!self::exists($type)) { | ||
// throw new Exception("The alert type '$type' does not exist in config"); | ||
// } | ||
|
||
// return self::type($type)['alert']; | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
<?php | ||
|
||
use Digitlimit\Alert\Session; | ||
use Digitlimit\Alert\SessionInterface; | ||
// use Digitlimit\Alert\Session; | ||
// use Digitlimit\Alert\SessionInterface; | ||
|
||
it('can flash data to session', function () | ||
{ | ||
// app()->make(SessionInterface::class); | ||
// it('can flash data to session', function () | ||
// { | ||
// app()->make(SessionInterface::class); | ||
|
||
// $session = Mockery::spy(SessionInterface::class); | ||
// // $session = app(SessionInterface::class); | ||
// // $store = Mockery::spy('Illuminate\Session\Store'); | ||
// // $session = new Session($store); | ||
// $session = Mockery::spy(SessionInterface::class); | ||
// // $session = app(SessionInterface::class); | ||
// // $store = Mockery::spy('Illuminate\Session\Store'); | ||
// // $session = new Session($store); | ||
|
||
// $session | ||
// ->flash('testing', ['test' => 'yes']); | ||
// $session | ||
// ->flash('testing', ['test' => 'yes']); | ||
|
||
// $session | ||
// ->get('testing'); | ||
// $session | ||
// ->get('testing'); | ||
|
||
// $session | ||
// ->shouldHaveReceived() | ||
// ->flash('testing', ['test' => 'yes']); | ||
// $session | ||
// ->shouldHaveReceived() | ||
// ->flash('testing', ['test' => 'yes']); | ||
|
||
// $session | ||
// ->shouldHaveReceived() | ||
// ->get('testing') | ||
// ->andReturn(['test' => 'yes']); | ||
// $session | ||
// ->shouldHaveReceived() | ||
// ->get('testing') | ||
// ->andReturn(['test' => 'yes']); | ||
|
||
})->name('session', 'session-flash'); | ||
// })->name('session', 'session-flash'); |