Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Add unit tests #20

Merged
merged 3 commits into from
Oct 13, 2015
Merged

Conversation

AntoineAugusti
Copy link
Collaborator

  • Add unit tests
  • Follow the PSR-2 coding convention
  • Follow PSR-4 for autoloading
  • Add docblocks

@AntoineAugusti
Copy link
Collaborator Author

@thomaswelton I'd love a review. Nothing should break, but I could use a second pair of eyes on this one.

AntoineAugusti added a commit that referenced this pull request Oct 13, 2015
@AntoineAugusti AntoineAugusti merged commit e8a0275 into thomaswelton:master Oct 13, 2015
@AntoineAugusti AntoineAugusti deleted the unit-tests branch October 13, 2015 06:16
@w4
Copy link

w4 commented Oct 13, 2015

Script php artisan clear-compiled handling the post-update-cmd event returned with an error



  [RuntimeException]                                                                                                                                                        
  Error Output: PHP Warning:  Uncaught exception 'ErrorException' with message 'require(): Filename cannot be empty' in private/vendor/laravel/framewor  
  k/src/Illuminate/Support/ServiceProvider.php:66                                                                                                                           
  Stacktrace:                                                                                                                                                              
  #0 private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(66): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2,   
  'require(): File...', '/home/vagrant/C...', 66, Array)                                                                                                                    
  #1 private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(66): Illuminate\Support\ServiceProvider->mergeConfigFrom()              
  #2 private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php(24): Illuminate\Support\ServiceProvider->mergeConfigFrom(false, 'gravatar')                                                                                                                                                             
  #3 private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php(14): Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->setupConfig()                                                                                                                                                         
  #4 [internal function]: Thomaswelton\LaravelGravatar\LaravelGravatarService in private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvide  
  r.php on line 66                                                                                                                                                          
  PHP Stacktrace:                                                                                                                                                          
  PHP   1. {main}() private/artisan:0                                                                                                                    
  PHP   2. Illuminate\Foundation\Console\Kernel->handle() private/artisan:36                                                                             
  PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:98            
  PHP   4. Illuminate\Foundation\Application->bootstrapWith() private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201          
  PHP   5. Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:203     
  PHP   6. Illuminate\Foundation\Application->boot() private/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17           
  PHP   7. array_walk() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:718                                                   
  PHP   8. Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:718                                                                                                                                                                   
  PHP   9. Illuminate\Foundation\Application->bootProvider() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:717              
  PHP  10. Illuminate\Container\Container->call() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734                         
  PHP  11. call_user_func_array:{private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503}() private/vendor/larav  
  el/framework/src/Illuminate/Container/Container.php:503                                                                                                                   
  PHP  12. Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->boot() private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503                                                                                                                                                                       
  PHP  13. Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->setupConfig() private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php:14                                                                                                                                                     
  PHP  14. Illuminate\Support\ServiceProvider->mergeConfigFrom() private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php:24  
  PHP Fatal error:  Illuminate\Support\ServiceProvider::mergeConfigFrom(): Failed opening required '' (include_path='.:/usr/share/php:/usr/share/pear') in private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php on line 66                                                                                
  PHP Stacktrace:                                                                                                                                                          
  PHP   1. {main}() private/artisan:0                                                                                                                    
  PHP   2. Illuminate\Foundation\Console\Kernel->handle() private/artisan:36                                                                             
  PHP   3. Illuminate\Foundation\Console\Kernel->bootstrap() private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:98            
  PHP   4. Illuminate\Foundation\Application->bootstrapWith() private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201          
  PHP   5. Illuminate\Foundation\Bootstrap\BootProviders->bootstrap() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:203     
  PHP   6. Illuminate\Foundation\Application->boot() private/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17           
  PHP   7. array_walk() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:718                                                   
  PHP   8. Illuminate\Foundation\Application->Illuminate\Foundation\{closure}() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:718                                                                                                                                                                   
  PHP   9. Illuminate\Foundation\Application->bootProvider() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:717              
  PHP  10. Illuminate\Container\Container->call() private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734                         
  PHP  11. call_user_func_array:{private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503}() private/vendor/larav  
  el/framework/src/Illuminate/Container/Container.php:503                                                                                                                   
  PHP  12. Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->boot() private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503                                                                                                                                                                       
  PHP  13. Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->setupConfig() private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php:14                                                                                                                                                     
  PHP  14. Illuminate\Support\ServiceProvider->mergeConfigFrom() private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php:24

Honestly not sure what's causing this, but can't seem to composer update to this version. I'll look into it a bit later

@AntoineAugusti
Copy link
Collaborator Author

Caused by this line:
https://github.com/thomaswelton/laravel-gravatar/blob/master/src/LaravelGravatarServiceProvider.php#L22

Will push a fix today

Antoine Augusti
www.antoine-augusti.fr

On 13 October 2015 at 10:12, Jordan notifications@github.com wrote:

returned with an error

[RuntimeException]

Error Output: PHP Warning: Uncaught exception 'ErrorException' with
message 'require(): Filename cannot be empty' in
private/vendor/laravel/framewor

k/src/Illuminate/Support/ServiceProvider.php:66

Stack trace:

#0
private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(66):
Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2,

'require(): File...', '/home/vagrant/C...', 66, Array)

#1 https://github.com/thomaswelton/laravel-gravatar/issues/1
private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php(66):
Illuminate\Support\ServiceProvider->mergeConfigFrom()

#2 https://github.com/thomaswelton/laravel-gravatar/pull/2
private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php(24):
Illuminate\Support\ServiceProvider->mergeConfigFrom(false

, 'gravatar')

#3 https://github.com/thomaswelton/laravel-gravatar/issues/3
private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php(14):
Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvid

er->setupConfig()

#4 https://github.com/thomaswelton/laravel-gravatar/issues/4 [internal
function]: Thomaswelton\LaravelGravatar\LaravelGravatarService in
private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvide

r.php on line 66

PHP Stack trace:

PHP 1. {main}() private/artisan:0

PHP 2. Illuminate\Foundation\Console\Kernel->handle() private/artisan:36

PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap()
private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:98

PHP 4. Illuminate\Foundation\Application->bootstrapWith()
private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201

PHP 5. Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:203

PHP 6. Illuminate\Foundation\Application->boot()
private/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17

PHP 7. array_walk()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:718

PHP 8. Illuminate\Foundation\Application->Illuminate\Foundation{closure}()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.

php:718

PHP 9. Illuminate\Foundation\Application->bootProvider()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:717

PHP 10. Illuminate\Container\Container->call()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734

PHP 11.
call_user_func_array:{private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503}()
private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503

PHP 12.
Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->boot()
private/vendor/laravel/framework/src/Illuminate/Container/Container.php:

503

PHP 13.
Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->setupConfig()
private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarS

erviceProvider.php:14

PHP 14. Illuminate\Support\ServiceProvider->mergeConfigFrom()
private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php:24

PHP Fatal error: Illuminate\Support\ServiceProvider::mergeConfigFrom():
Failed opening required ''
(include_path='.:/usr/share/php:/usr/share/pear') in
private/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php
on line 66

PHP Stack trace:

PHP 1. {main}() private/artisan:0

PHP 2. Illuminate\Foundation\Console\Kernel->handle() private/artisan:36

PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap()
private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:98

PHP 4. Illuminate\Foundation\Application->bootstrapWith()
private/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201

PHP 5. Illuminate\Foundation\Bootstrap\BootProviders->bootstrap()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:203

PHP 6. Illuminate\Foundation\Application->boot()
private/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php:17

PHP 7. array_walk()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:718

PHP 8. Illuminate\Foundation\Application->Illuminate\Foundation{closure}()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.

php:718

PHP 9. Illuminate\Foundation\Application->bootProvider()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:717

PHP 10. Illuminate\Container\Container->call()
private/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:734

PHP 11.
call_user_func_array:{private/vendor/laravel/framework/src/Illuminate/Container/Container.php:503}()
private/vendor/larav

el/framework/src/Illuminate/Container/Container.php:503

PHP 12.
Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->boot()
private/vendor/laravel/framework/src/Illuminate/Container/Container.php:

503

PHP 13.
Thomaswelton\LaravelGravatar\LaravelGravatarServiceProvider->setupConfig()
private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarS

erviceProvider.php:14

PHP 14. Illuminate\Support\ServiceProvider->mergeConfigFrom()
private/vendor/thomaswelton/laravel-gravatar/src/LaravelGravatarServiceProvider.php:24```

Honestly not sure what's causing this, but can't seem to composer update
to this version. I'll look into it a bit later

—
Reply to this email directly or view it on GitHub
https://github.com/thomaswelton/laravel-gravatar/pull/20#issuecomment-147641430
.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants