-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
ServiceProviderTest.php
47 lines (37 loc) · 1.19 KB
/
ServiceProviderTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/*
* This file is part of Laravel Optimus.
*
* (c) Anton Komarev <anton@komarev.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Cog\Tests\Laravel\Optimus\Providers;
use Cog\Laravel\Optimus\OptimusFactory;
use Cog\Laravel\Optimus\OptimusManager;
use Cog\Tests\Laravel\Optimus\AbstractTestCase;
use GrahamCampbell\TestBenchCore\ServiceProviderTrait;
use Jenssegers\Optimus\Optimus;
final class ServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
public function testOptimusFactoryIsInjectable(): void
{
$this->assertIsInjectable(OptimusFactory::class);
}
public function testOptimusManagerIsInjectable(): void
{
$this->assertIsInjectable(OptimusManager::class);
}
public function testBindings(): void
{
$this->assertIsInjectable(Optimus::class);
$original = $this->app['optimus.connection'];
$this->app['optimus']->reconnect();
$new = $this->app['optimus.connection'];
$this->assertNotSame($original, $new);
$this->assertEquals($original, $new);
}
}