diff --git a/src/Notyf/Laravel/FlasherNotyfServiceProvider.php b/src/Notyf/Laravel/FlasherNotyfServiceProvider.php index 1de9c0b0..0d9a0fb8 100644 --- a/src/Notyf/Laravel/FlasherNotyfServiceProvider.php +++ b/src/Notyf/Laravel/FlasherNotyfServiceProvider.php @@ -2,7 +2,7 @@ namespace Flasher\Notyf\Laravel; -use Illuminate\Contracts\Support\DeferrableProvider; +use Illuminate\Container\Container; use Illuminate\Support\ServiceProvider; use Flasher\Notyf\Laravel\ServiceProvider\ServiceProviderManager; @@ -37,7 +37,7 @@ class FlasherNotyfServiceProvider extends ServiceProvider } /** - * @return \Illuminate\Container\Container + * @return Container */ public function getApplication() { diff --git a/src/Notyf/Laravel/ServiceProvider/Providers/Laravel.php b/src/Notyf/Laravel/ServiceProvider/Providers/Laravel.php index 9bcc658f..cc112cf4 100644 --- a/src/Notyf/Laravel/ServiceProvider/Providers/Laravel.php +++ b/src/Notyf/Laravel/ServiceProvider/Providers/Laravel.php @@ -26,7 +26,7 @@ class Laravel implements ServiceProviderInterface public function publishConfig(FlasherNotyfServiceProvider $provider) { - $source = realpath($raw = __DIR__.'/../../../resources/config/config.php') ?: $raw; + $source = realpath($raw = __DIR__.'/../../Resources/config/config.php') ?: $raw; $provider->publishes(array($source => config_path('flasher_notyf.php')), 'config'); diff --git a/src/Notyf/Laravel/ServiceProvider/Providers/Laravel4.php b/src/Notyf/Laravel/ServiceProvider/Providers/Laravel4.php index 5288ac02..c9a9b46c 100644 --- a/src/Notyf/Laravel/ServiceProvider/Providers/Laravel4.php +++ b/src/Notyf/Laravel/ServiceProvider/Providers/Laravel4.php @@ -14,7 +14,7 @@ final class Laravel4 extends Laravel public function publishConfig(FlasherNotyfServiceProvider $provider) { - $provider->package('php-flasher/flasher-laravel-notyf', 'flasher_notyf', __DIR__.'/../../../resources'); + $provider->package('php-flasher/flasher-laravel-notyf', 'flasher_notyf', __DIR__.'/../../Resources'); } public function mergeConfigFromNotyf() diff --git a/src/Notyf/Laravel/ServiceProvider/Providers/Lumen.php b/src/Notyf/Laravel/ServiceProvider/Providers/Lumen.php index 877edd27..7d1d37f0 100644 --- a/src/Notyf/Laravel/ServiceProvider/Providers/Lumen.php +++ b/src/Notyf/Laravel/ServiceProvider/Providers/Lumen.php @@ -14,7 +14,7 @@ final class Lumen extends Laravel public function publishConfig(FlasherNotyfServiceProvider $provider) { - $source = realpath($raw = __DIR__.'/../../../resources/config/config.php') ?: $raw; + $source = realpath($raw = __DIR__.'/../../Resources/config/config.php') ?: $raw; $this->app->configure('flasher_notyf'); diff --git a/src/Notyf/Laravel/Tests/NotifyNotyfServiceProviderTest.php b/src/Notyf/Laravel/Tests/FlasherNotyfServiceProviderTest.php similarity index 61% rename from src/Notyf/Laravel/Tests/NotifyNotyfServiceProviderTest.php rename to src/Notyf/Laravel/Tests/FlasherNotyfServiceProviderTest.php index b6aadaf1..76acdd0c 100644 --- a/src/Notyf/Laravel/Tests/NotifyNotyfServiceProviderTest.php +++ b/src/Notyf/Laravel/Tests/FlasherNotyfServiceProviderTest.php @@ -2,37 +2,37 @@ namespace Flasher\Notyf\Laravel\Tests; -final class NotifyNotyfServiceProviderTest extends TestCase +final class FlasherNotyfServiceProviderTest extends TestCase { public function testContainerContainNotifyServices() { - $this->assertTrue($this->app->bound('flasher.factory')); + $this->assertTrue($this->app->bound('flasher')); $this->assertTrue($this->app->bound('flasher.factory.notyf')); } public function testNotifyFactoryIsAddedToExtensionsArray() { - $manager = $this->app->make('flasher.factory'); + $flasher = $this->app->make('flasher'); - $reflection = new \ReflectionClass($manager); + $reflection = new \ReflectionClass($flasher); $property = $reflection->getProperty('drivers'); $property->setAccessible(true); - $extensions = $property->getValue($manager); + $extensions = $property->getValue($flasher); $this->assertCount(1, $extensions); - $this->assertInstanceOf('Flasher\Prime\FlasherInterface', $extensions['notyf']); + $this->assertInstanceOf('Flasher\Prime\Factory\FlasherFactoryInterface', $extensions[0]); } public function testConfigNotyfInjectedInGlobalNotifyConfig() { - $manager = $this->app->make('flasher.factory'); + $flasher = $this->app->make('flasher'); - $reflection = new \ReflectionClass($manager); + $reflection = new \ReflectionClass($flasher); $property = $reflection->getProperty('config'); $property->setAccessible(true); - $config = $property->getValue($manager); + $config = $property->getValue($flasher); $this->assertArrayHasKey('notyf', $config->get('adapters')); diff --git a/src/Notyf/Laravel/Tests/TestCase.php b/src/Notyf/Laravel/Tests/TestCase.php index 785c70de..4d616883 100644 --- a/src/Notyf/Laravel/Tests/TestCase.php +++ b/src/Notyf/Laravel/Tests/TestCase.php @@ -9,31 +9,30 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Facade; use Orchestra\Testbench\TestCase as Orchestra; -final class TestCase extends Orchestra +class TestCase extends Orchestra { /** - * @param \Illuminate\Foundation\Application $app + * @param Application $app * * @return array */ protected function getPackageProviders($app = null) { return array( - 'Flasher\LaravelFlasher\PrimeServiceProvider', - 'Flasher\Notyf\LaravelFlasher\PrimeNotyfServiceProvider', + 'Flasher\Laravel\FlasherServiceProvider', + '\Flasher\Notyf\Laravel\FlasherNotyfServiceProvider', ); } /** - * @param \Illuminate\Foundation\Application $app + * @param Application $app */ protected function getEnvironmentSetUp($app) { $separator = $this->isLaravel4() ? '::config' : ''; $app['config']->set('session'.$separator.'.driver', 'array'); - $app['config']->set('notify'.$separator.'.stamps_middlewares', array()); - $app['config']->set('notify'.$separator.'.adapters', array( + $app['config']->set('flasher'.$separator.'.adapters', array( 'notyf' => array('scripts' => array('jquery.js'), 'styles' => array('styles.css'), 'options' => array()), )); } diff --git a/src/Notyf/Laravel/phpunit.xml.dist b/src/Notyf/Laravel/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Notyf/Laravel/phpunit.xml.dist +++ b/src/Notyf/Laravel/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Notyf/Prime/phpunit.xml.dist b/src/Notyf/Prime/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Notyf/Prime/phpunit.xml.dist +++ b/src/Notyf/Prime/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Notyf/Symfony/phpunit.xml.dist b/src/Notyf/Symfony/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Notyf/Symfony/phpunit.xml.dist +++ b/src/Notyf/Symfony/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Pnotify/Laravel/NotifyPnotifyServiceProvider.php b/src/Pnotify/Laravel/FlasherPnotifyServiceProvider.php similarity index 85% rename from src/Pnotify/Laravel/NotifyPnotifyServiceProvider.php rename to src/Pnotify/Laravel/FlasherPnotifyServiceProvider.php index c752ec9f..b8aea7df 100644 --- a/src/Pnotify/Laravel/NotifyPnotifyServiceProvider.php +++ b/src/Pnotify/Laravel/FlasherPnotifyServiceProvider.php @@ -2,11 +2,11 @@ namespace Flasher\Pnotify\Laravel; -use Illuminate\Contracts\Support\DeferrableProvider; +use Illuminate\Container\Container; use Illuminate\Support\ServiceProvider; use Flasher\Pnotify\Laravel\ServiceProvider\ServiceProviderManager; -class NotifyPnotifyServiceProvider extends ServiceProvider +class FlasherPnotifyServiceProvider extends ServiceProvider { public function boot() { @@ -31,14 +31,13 @@ class NotifyPnotifyServiceProvider extends ServiceProvider public function provides() { return array( - 'flasher.factory', 'flasher.factory.pnotify', 'flasher.renderer.pnotify', ); } /** - * @return \Illuminate\Container\Container + * @return Container */ public function getApplication() { diff --git a/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel.php b/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel.php index 4db2f0c4..c00994a9 100644 --- a/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel.php +++ b/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel.php @@ -2,9 +2,9 @@ namespace Flasher\Pnotify\Laravel\ServiceProvider\Providers; -use Flasher\Pnotify\LaravelFlasher\PrimePnotifyServiceProvider; -use Flasher\PFlasher\Prime\TestsProducer\PnotifyProducer; -use Flasher\PFlasher\Prime\Renderer\PnotifyRenderer; +use Flasher\PFlasher\Prime\PnotifyRenderer; +use Flasher\Pnotify\Laravel\FlasherPnotifyServiceProvider; +use Flasher\Pnotify\Prime\PnotifyFactory; use Flasher\Prime\Flasher; use Flasher\Prime\Renderer\RendererManager; use Illuminate\Container\Container; @@ -24,19 +24,19 @@ class Laravel implements ServiceProviderInterface return $this->app instanceof Application; } - public function publishConfig(NotifyPnotifyServiceProvider $provider) + public function publishConfig(FlasherPnotifyServiceProvider $provider) { - $source = realpath($raw = __DIR__.'/../../../resources/config/config.php') ?: $raw; + $source = realpath($raw = __DIR__.'/../../Resources/config/config.php') ?: $raw; - $provider->publishes(array($source => config_path('notify_pnotify.php')), 'config'); + $provider->publishes(array($source => config_path('flasher_pnotify.php')), 'config'); - $provider->mergeConfigFrom($source, 'notify_pnotify'); + $provider->mergeConfigFrom($source, 'flasher_pnotify'); } public function registerNotifyPnotifyServices() { $this->app->singleton('flasher.factory.pnotify', function (Container $app) { - return new PnotifyProducer($app['flasher.storage'], $app['flasher.middleware']); + return new PnotifyFactory($app['flasher.event_dispatcher']); }); $this->app->singleton('flasher.renderer.pnotify', function (Container $app) { @@ -46,14 +46,14 @@ class Laravel implements ServiceProviderInterface $this->app->alias('flasher.factory.pnotify', 'Flasher\PFlasher\Prime\TestsProducer\PnotifyProducer'); $this->app->alias('flasher.renderer.pnotify', 'Flasher\PFlasher\Prime\Renderer\PnotifyRenderer'); - $this->app->extend('flasher.factory', function (Flasher $manager, Container $app) { - $manager->addDriver('pnotify', $app['flasher.factory.pnotify']); + $this->app->extend('flasher', function (Flasher $manager, Container $app) { + $manager->addDriver($app['flasher.factory.pnotify']); return $manager; }); $this->app->extend('flasher.renderer', function (RendererManager $manager, Container $app) { - $manager->addDriver('pnotify', $app['flasher.renderer.pnotify']); + $manager->addDriver($app['flasher.renderer.pnotify']); return $manager; }); @@ -61,10 +61,10 @@ class Laravel implements ServiceProviderInterface public function mergeConfigFromPnotify() { - $notifyConfig = $this->app['config']->get('flasher.adapters.pnotify', array()); + $flasherConfig = $this->app['config']->get('flasher.adapters.pnotify', array()); - $pnotifyConfig = $this->app['config']->get('notify_pnotify', array()); + $pnotifyConfig = $this->app['config']->get('flasher_pnotify', array()); - $this->app['config']->set('flasher.adapters.pnotify', array_merge($pnotifyConfig, $notifyConfig)); + $this->app['config']->set('flasher.adapters.pnotify', array_merge($pnotifyConfig, $flasherConfig)); } } diff --git a/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel4.php b/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel4.php index c26cb472..55528de2 100644 --- a/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel4.php +++ b/src/Pnotify/Laravel/ServiceProvider/Providers/Laravel4.php @@ -2,8 +2,8 @@ namespace Flasher\Pnotify\Laravel\ServiceProvider\Providers; +use Flasher\Pnotify\Laravel\FlasherPnotifyServiceProvider; use Illuminate\Foundation\Application; -use Flasher\Pnotify\LaravelFlasher\PrimePnotifyServiceProvider; final class Laravel4 extends Laravel { @@ -12,17 +12,17 @@ final class Laravel4 extends Laravel return $this->app instanceof Application && 0 === strpos(Application::VERSION, '4.'); } - public function publishConfig(NotifyPnotifyServiceProvider $provider) + public function publishConfig(FlasherPnotifyServiceProvider $provider) { - $provider->package('php-flasher/flasher-laravel-pnotify', 'notify_pnotify', __DIR__.'/../../../resources'); + $provider->package('php-flasher/flasher-laravel-pnotify', 'notify_pnotify', __DIR__.'/../../Resources'); } public function mergeConfigFromPnotify() { - $notifyConfig = $this->app['config']->get('notify::config.adapters.pnotify', array()); + $flasherConfig = $this->app['config']->get('flasher::config.adapters.pnotify', array()); - $pnotifyConfig = $this->app['config']->get('notify_pnotify::config', array()); + $pnotifyConfig = $this->app['config']->get('flasher_pnotify::config', array()); - $this->app['config']->set('notify::config.adapters.pnotify', array_merge($pnotifyConfig, $notifyConfig)); + $this->app['config']->set('flasher::config.adapters.pnotify', array_merge($pnotifyConfig, $flasherConfig)); } } diff --git a/src/Pnotify/Laravel/ServiceProvider/Providers/Lumen.php b/src/Pnotify/Laravel/ServiceProvider/Providers/Lumen.php index 36747c71..a7740778 100644 --- a/src/Pnotify/Laravel/ServiceProvider/Providers/Lumen.php +++ b/src/Pnotify/Laravel/ServiceProvider/Providers/Lumen.php @@ -2,8 +2,8 @@ namespace Flasher\Pnotify\Laravel\ServiceProvider\Providers; +use Flasher\Pnotify\Laravel\FlasherPnotifyServiceProvider; use Laravel\Lumen\Application; -use Flasher\Pnotify\LaravelFlasher\PrimePnotifyServiceProvider; final class Lumen extends Laravel { @@ -12,12 +12,12 @@ final class Lumen extends Laravel return $this->app instanceof Application; } - public function publishConfig(NotifyPnotifyServiceProvider $provider) + public function publishConfig(FlasherPnotifyServiceProvider $provider) { - $source = realpath($raw = __DIR__.'/../../../resources/config/config.php') ?: $raw; + $source = realpath($raw = __DIR__.'/../../Resources/config/config.php') ?: $raw; - $this->app->configure('notify_pnotify'); + $this->app->configure('flasher_pnotify'); - $provider->mergeConfigFrom($source, 'notify_pnotify'); + $provider->mergeConfigFrom($source, 'flasher_pnotify'); } } diff --git a/src/Pnotify/Laravel/ServiceProvider/Providers/ServiceProviderInterface.php b/src/Pnotify/Laravel/ServiceProvider/Providers/ServiceProviderInterface.php index c1696ac9..5eff948a 100644 --- a/src/Pnotify/Laravel/ServiceProvider/Providers/ServiceProviderInterface.php +++ b/src/Pnotify/Laravel/ServiceProvider/Providers/ServiceProviderInterface.php @@ -2,13 +2,13 @@ namespace Flasher\Pnotify\Laravel\ServiceProvider\Providers; -use Flasher\Pnotify\LaravelFlasher\PrimePnotifyServiceProvider; +use Flasher\Pnotify\Laravel\FlasherPnotifyServiceProvider; interface ServiceProviderInterface { public function shouldBeUsed(); - public function publishConfig(NotifyPnotifyServiceProvider $provider); + public function publishConfig(FlasherPnotifyServiceProvider $provider); public function registerNotifyPnotifyServices(); diff --git a/src/Pnotify/Laravel/ServiceProvider/ServiceProviderManager.php b/src/Pnotify/Laravel/ServiceProvider/ServiceProviderManager.php index b220009e..6ee59e8a 100644 --- a/src/Pnotify/Laravel/ServiceProvider/ServiceProviderManager.php +++ b/src/Pnotify/Laravel/ServiceProvider/ServiceProviderManager.php @@ -2,7 +2,7 @@ namespace Flasher\Pnotify\Laravel\ServiceProvider; -use Flasher\Pnotify\LaravelFlasher\PrimePnotifyServiceProvider; +use Flasher\Pnotify\Laravel\FlasherPnotifyServiceProvider; use Flasher\Pnotify\Laravel\ServiceProvider\Providers\ServiceProviderInterface; final class ServiceProviderManager @@ -20,7 +20,7 @@ final class ServiceProviderManager private $notifyServiceProvider; - public function __construct(NotifyPnotifyServiceProvider $notifyServiceProvider) + public function __construct(FlasherPnotifyServiceProvider $notifyServiceProvider) { $this->notifyServiceProvider = $notifyServiceProvider; } diff --git a/src/Pnotify/Laravel/Tests/NotifyPnotifyServiceProviderTest.php b/src/Pnotify/Laravel/Tests/FlasherPnotifyServiceProviderTest.php similarity index 69% rename from src/Pnotify/Laravel/Tests/NotifyPnotifyServiceProviderTest.php rename to src/Pnotify/Laravel/Tests/FlasherPnotifyServiceProviderTest.php index 46e987e1..6c086cb6 100644 --- a/src/Pnotify/Laravel/Tests/NotifyPnotifyServiceProviderTest.php +++ b/src/Pnotify/Laravel/Tests/FlasherPnotifyServiceProviderTest.php @@ -2,31 +2,31 @@ namespace Flasher\Pnotify\Laravel\Tests; -class NotifyPnotifyServiceProviderTest extends TestCase +class FlasherPnotifyServiceProviderTest extends TestCase { public function testContainerContainNotifyServices() { - $this->assertTrue($this->app->bound('flasher.factory')); + $this->assertTrue($this->app->bound('flasher')); $this->assertTrue($this->app->bound('flasher.factory.pnotify')); } public function testNotifyFactoryIsAddedToExtensionsArray() { - $manager = $this->app->make('flasher.factory'); + $flasher = $this->app->make('flasher'); - $reflection = new \ReflectionClass($manager); + $reflection = new \ReflectionClass($flasher); $property = $reflection->getProperty('drivers'); $property->setAccessible(true); - $extensions = $property->getValue($manager); + $extensions = $property->getValue($flasher); $this->assertCount(1, $extensions); - $this->assertInstanceOf('Flasher\Prime\FlasherInterface', $extensions['pnotify']); + $this->assertInstanceOf('Flasher\Prime\Factory\FlasherFactoryInterface', $extensions[0]); } public function testConfigPnotifyInjectedInGlobalNotifyConfig() { - $manager = $this->app->make('flasher.factory'); + $manager = $this->app->make('flasher'); $reflection = new \ReflectionClass($manager); $property = $reflection->getProperty('config'); diff --git a/src/Pnotify/Laravel/Tests/TestCase.php b/src/Pnotify/Laravel/Tests/TestCase.php index 577be22c..6151be5f 100644 --- a/src/Pnotify/Laravel/Tests/TestCase.php +++ b/src/Pnotify/Laravel/Tests/TestCase.php @@ -12,28 +12,27 @@ use Illuminate\Config\Repository as Config; class TestCase extends Orchestra { /** - * @param \Illuminate\Foundation\Application $app + * @param Application $app * * @return array */ protected function getPackageProviders($app = null) { return array( - 'Flasher\LaravelFlasher\PrimeServiceProvider', - 'Flasher\Pnotify\LaravelFlasher\PrimePnotifyServiceProvider', + 'Flasher\Laravel\FlasherServiceProvider', + 'Flasher\Pnotify\Laravel\FlasherPnotifyServiceProvider', ); } /** - * @param \Illuminate\Foundation\Application $app + * @param Application $app */ protected function getEnvironmentSetUp($app) { $separator = $this->isLaravel4() ? '::config' : ''; $app['config']->set('session'.$separator.'.driver', 'array'); - $app['config']->set('notify'.$separator.'.stamps_middlewares', array()); - $app['config']->set('notify'.$separator.'.adapters', array( + $app['config']->set('flasher'.$separator.'.adapters', array( 'pnotify' => array('scripts' => array('jquery.js'), 'styles' => array('styles.css'), 'options' => array()), )); } diff --git a/src/Pnotify/Laravel/composer.json b/src/Pnotify/Laravel/composer.json index a6e167c8..52b1ecb5 100644 --- a/src/Pnotify/Laravel/composer.json +++ b/src/Pnotify/Laravel/composer.json @@ -47,7 +47,7 @@ "extra": { "laravel": { "providers": [ - "Flasher\\Pnotify\\Laravel\\NotifyPnotifyServiceProvider" + "FlasherPnotifyServiceProvider" ] } }, diff --git a/src/Pnotify/Laravel/phpunit.xml.dist b/src/Pnotify/Laravel/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Pnotify/Laravel/phpunit.xml.dist +++ b/src/Pnotify/Laravel/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Pnotify/Prime/phpunit.xml.dist b/src/Pnotify/Prime/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Pnotify/Prime/phpunit.xml.dist +++ b/src/Pnotify/Prime/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Pnotify/Symfony/phpunit.xml.dist b/src/Pnotify/Symfony/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Pnotify/Symfony/phpunit.xml.dist +++ b/src/Pnotify/Symfony/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/SweetAlert/Laravel/FlasherSweetAlertServiceProvider.php b/src/SweetAlert/Laravel/FlasherSweetAlertServiceProvider.php index e08952e8..c08246bc 100644 --- a/src/SweetAlert/Laravel/FlasherSweetAlertServiceProvider.php +++ b/src/SweetAlert/Laravel/FlasherSweetAlertServiceProvider.php @@ -2,7 +2,7 @@ namespace Flasher\SweetAlert\Laravel; -use Illuminate\Contracts\Support\DeferrableProvider; +use Illuminate\Container\Container; use Illuminate\Support\ServiceProvider; use Flasher\SweetAlert\Laravel\ServiceProvider\ServiceProviderManager; @@ -37,7 +37,7 @@ final class FlasherSweetAlertServiceProvider extends ServiceProvider } /** - * @return \Illuminate\Container\Container + * @return Container */ public function getApplication() { diff --git a/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel.php b/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel.php index 57ed86f8..b2cbc7a4 100644 --- a/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel.php +++ b/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel.php @@ -26,7 +26,7 @@ class Laravel implements ServiceProviderInterface public function publishConfig(FlasherSweetAlertServiceProvider $provider) { - $source = realpath($raw = __DIR__.'/../../../resources/config/config.php') ?: $raw; + $source = realpath($raw = __DIR__.'/../../Resources/config/config.php') ?: $raw; $provider->publishes(array($source => config_path('flasher_sweet_alert.php')), 'config'); diff --git a/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel4.php b/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel4.php index 455b0364..6e950f83 100644 --- a/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel4.php +++ b/src/SweetAlert/Laravel/ServiceProvider/Providers/Laravel4.php @@ -14,7 +14,7 @@ final class Laravel4 extends Laravel public function publishConfig(FlasherSweetAlertServiceProvider $provider) { - $provider->package('php-flasher/flasher-laravel-sweet_alert', 'flasher_sweet_alert', __DIR__.'/../../../resources'); + $provider->package('php-flasher/flasher-laravel-sweet_alert', 'flasher_sweet_alert', __DIR__.'/../../Resources'); } public function mergeConfigFromSweetAlert() diff --git a/src/SweetAlert/Laravel/ServiceProvider/Providers/Lumen.php b/src/SweetAlert/Laravel/ServiceProvider/Providers/Lumen.php index ed9edda2..49527245 100644 --- a/src/SweetAlert/Laravel/ServiceProvider/Providers/Lumen.php +++ b/src/SweetAlert/Laravel/ServiceProvider/Providers/Lumen.php @@ -14,7 +14,7 @@ final class Lumen extends Laravel public function publishConfig(FlasherSweetAlertServiceProvider $provider) { - $source = realpath($raw = __DIR__.'/../../../resources/config/config.php') ?: $raw; + $source = realpath($raw = __DIR__.'/../../Resources/config/config.php') ?: $raw; $this->app->configure('flasher_sweet_alert'); diff --git a/src/SweetAlert/Laravel/Tests/NotifySweetAlertServiceProviderTest.php b/src/SweetAlert/Laravel/Tests/FlasherSweetAlertServiceProviderTest.php similarity index 61% rename from src/SweetAlert/Laravel/Tests/NotifySweetAlertServiceProviderTest.php rename to src/SweetAlert/Laravel/Tests/FlasherSweetAlertServiceProviderTest.php index 6a418ffc..1664385a 100644 --- a/src/SweetAlert/Laravel/Tests/NotifySweetAlertServiceProviderTest.php +++ b/src/SweetAlert/Laravel/Tests/FlasherSweetAlertServiceProviderTest.php @@ -2,37 +2,37 @@ namespace Flasher\SweetAlert\Laravel\Tests; -class NotifySweetAlertServiceProviderTest extends TestCase +class FlasherSweetAlertServiceProviderTest extends TestCase { public function testContainerContainNotifyServices() { - $this->assertTrue($this->app->bound('flasher.factory')); + $this->assertTrue($this->app->bound('flasher')); $this->assertTrue($this->app->bound('flasher.factory.sweet_alert')); } public function testNotifyFactoryIsAddedToExtensionsArray() { - $manager = $this->app->make('flasher.factory'); + $flasher = $this->app->make('flasher'); - $reflection = new \ReflectionClass($manager); + $reflection = new \ReflectionClass($flasher); $property = $reflection->getProperty('drivers'); $property->setAccessible(true); - $extensions = $property->getValue($manager); + $extensions = $property->getValue($flasher); $this->assertCount(1, $extensions); - $this->assertInstanceOf('Flasher\Prime\FlasherInterface', $extensions['sweet_alert']); + $this->assertInstanceOf('Flasher\Prime\Factory\FlasherFactoryInterface', $extensions[0]); } public function testConfigSweetAlertInjectedInGlobalNotifyConfig() { - $manager = $this->app->make('flasher.factory'); + $flasher = $this->app->make('flasher'); - $reflection = new \ReflectionClass($manager); + $reflection = new \ReflectionClass($flasher); $property = $reflection->getProperty('config'); $property->setAccessible(true); - $config = $property->getValue($manager); + $config = $property->getValue($flasher); $this->assertArrayHasKey('sweet_alert', $config->get('adapters')); diff --git a/src/SweetAlert/Laravel/Tests/TestCase.php b/src/SweetAlert/Laravel/Tests/TestCase.php index d3e2f115..34711e4c 100644 --- a/src/SweetAlert/Laravel/Tests/TestCase.php +++ b/src/SweetAlert/Laravel/Tests/TestCase.php @@ -12,28 +12,27 @@ use Orchestra\Testbench\TestCase as Orchestra; class TestCase extends Orchestra { /** - * @param \Illuminate\Foundation\Application $app + * @param Application $app * * @return array */ protected function getPackageProviders($app = null) { return array( - 'Flasher\LaravelFlasher\PrimeServiceProvider', - 'Flasher\SweetAlert\LaravelFlasher\PrimeSweetAlertServiceProvider', + 'Flasher\Laravel\FlasherServiceProvider', + 'Flasher\SweetAlert\Laravel\FlasherSweetAlertServiceProvider', ); } /** - * @param \Illuminate\Foundation\Application $app + * @param Application $app */ protected function getEnvironmentSetUp($app) { $separator = $this->isLaravel4() ? '::config' : ''; $app['config']->set('session'.$separator.'.driver', 'array'); - $app['config']->set('notify'.$separator.'.stamps_middlewares', array()); - $app['config']->set('notify'.$separator.'.adapters', array( + $app['config']->set('flasher'.$separator.'.adapters', array( 'sweet_alert' => array('scripts' => array('jquery.js'), 'styles' => array('styles.css'), 'options' => array()), )); } diff --git a/src/SweetAlert/Laravel/phpunit.xml.dist b/src/SweetAlert/Laravel/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/SweetAlert/Laravel/phpunit.xml.dist +++ b/src/SweetAlert/Laravel/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/SweetAlert/Prime/phpunit.xml.dist b/src/SweetAlert/Prime/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/SweetAlert/Prime/phpunit.xml.dist +++ b/src/SweetAlert/Prime/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/SweetAlert/Symfony/phpunit.xml.dist b/src/SweetAlert/Symfony/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/SweetAlert/Symfony/phpunit.xml.dist +++ b/src/SweetAlert/Symfony/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Toastr/Laravel/FlasherToastrServiceProvider.php b/src/Toastr/Laravel/FlasherToastrServiceProvider.php index 3b03142c..a501d6a4 100644 --- a/src/Toastr/Laravel/FlasherToastrServiceProvider.php +++ b/src/Toastr/Laravel/FlasherToastrServiceProvider.php @@ -2,7 +2,7 @@ namespace Flasher\Toastr\Laravel; -use Illuminate\Contracts\Support\DeferrableProvider; +use Illuminate\Container\Container; use Illuminate\Support\ServiceProvider; use Flasher\Toastr\Laravel\ServiceProvider\ServiceProviderManager; @@ -31,14 +31,13 @@ final class FlasherToastrServiceProvider extends ServiceProvider public function provides() { return array( - 'flasher.factory', 'flasher.factory.toastr', 'flasher.renderer.toastr', ); } /** - * @return \Illuminate\Container\Container + * @return Container */ public function getApplication() { diff --git a/src/Toastr/Laravel/Tests/NotifyToastrServiceProviderTest.php b/src/Toastr/Laravel/Tests/FlasherToastrServiceProviderTest.php similarity index 95% rename from src/Toastr/Laravel/Tests/NotifyToastrServiceProviderTest.php rename to src/Toastr/Laravel/Tests/FlasherToastrServiceProviderTest.php index 1075838d..96b5200c 100644 --- a/src/Toastr/Laravel/Tests/NotifyToastrServiceProviderTest.php +++ b/src/Toastr/Laravel/Tests/FlasherToastrServiceProviderTest.php @@ -2,7 +2,7 @@ namespace Flasher\Toastr\Laravel\Tests; -class NotifyToastrServiceProviderTest extends TestCase +class FlasherToastrServiceProviderTest extends TestCase { public function testContainerContainNotifyServices() { diff --git a/src/Toastr/Prime/phpunit.xml.dist b/src/Toastr/Prime/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Toastr/Prime/phpunit.xml.dist +++ b/src/Toastr/Prime/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./ diff --git a/src/Toastr/Symfony/phpunit.xml.dist b/src/Toastr/Symfony/phpunit.xml.dist index 2621c486..1e1af721 100644 --- a/src/Toastr/Symfony/phpunit.xml.dist +++ b/src/Toastr/Symfony/phpunit.xml.dist @@ -16,7 +16,7 @@ - src/ + ./