I am testing an API that returns a JOSN object, while running the following:
public function testBasicExample()
{
$response = $this->call('GET', 'sites/1/webmaster/totalstats?since=2014-01-01&until=2014-12-30');
}
getting error:
There was 1 error:
1) ExampleTest::testBasicExample ErrorException: call_user_func() expects parameter 1 to be a valid callback, no array or string given
/var/www/html/laravel/app/facade/Webmaster.php:527 /var/www/html/laravel/app/helpers/WebmasterHelper.php:100 /var/www/html/laravel/app/controllers/WebmasterController.php:129 /var/www/html/laravel/app/routes.php:73 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Routing/Route.php:109 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1033 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Routing/Router.php:1001 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:775 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:745 /var/www/html/laravel/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Client.php:81 /var/www/html/laravel/vendor/symfony/browser-kit/Symfony/Component/BrowserKit/Client.php:327 /var/www/html/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Testing/ApplicationTrait.php:51 /var/www/html/laravel/app/tests/ExampleTest.php:16
FAILURES! Tests: 1, Assertions: 0, Errors: 1.
I just started laravel a few days ago so I might do some very basic mistakes. Please help. Thanks