Apr 27, 2016
0
Level 1
laracasts/Integrated - Access level to Laravel\Lumen\Testing\TestCase::seeInDatabase() must be public (as in class Laracasts\Integrated\Emulator)
Hi all
I've implemented "laracasts/Integrated", then I changed the TestCase.php to:
<?php
use Laracasts\Integrated\Extensions\Lumen as IntegrationTest;
class TestCase extends IntegrationTest
{
/**
* Creates the application.
*
* @return \Laravel\Lumen\Application
*/
public function createApplication()
{
return require __DIR__.'/../bootstrap/app.php';
}
}
then, my personal AgencyControllerTest test Class is:
<?php
namespace Tests\App\Api\V1\Controllers;
use Laravel\Lumen\Testing\DatabaseTransactions;
use TestCase;
class AgencyControllerTest extends TestCase
{
/** @test **/
public function index_status_code_should_be_200()
{
$this->visit('/agencies')->seeStatusCode(200);
}
}
?>
but running phpunit I receive:
$ phpunit
Fatal error: Access level to Laravel\Lumen\Testing\TestCase::seeInDatabase() must be public (as in class Laracasts\Integrated\Emulator) in /Users/valentino/Desktop/gitwork/group__cat/flytsunamiws/vendor/laracasts/integrated/src/Extensions/Lumen.php on line 10
[Symfony\Component\Debug\Exception\FatalErrorException]
Access level to Laravel\Lumen\Testing\TestCase::seeInDatabase() must be public (as in class Laracasts\Integrated\Emulator)
$
Any idea?
The Lumen.php Class is:
<?php
namespace Laracasts\Integrated\Extensions;
use Laracasts\Integrated\Extensions\Traits\LaravelTestCase;
use Laravel\Lumen\Testing\TestCase;
use Laracasts\Integrated\Emulator;
abstract class Lumen extends TestCase implements Emulator
{
use LaravelTestCase;
}
that extend TesCase.phpwhich contains:
protected function seeInDatabase($table, array $data, $onConnection = null)
that implement Emulator.php which contains:
public function seeInDatabase($table, array $data);
Is this normal?
Thank you for help.
Please or to participate in this conversation.