I've created a really basic console command test following the docs :
<?php
namespace Tests\Feature;
use PHPUnit\Framework\TestCase;
class QueueJobCommandTest extends TestCase
{
/**
* Test a job argument is requied
*
* @return void
*/
public function testNoArgumentsIsError()
{
$this->artisan('queue:job')
->expectsOutput('No job specified')
->assertExitCode(0);
}
}
but when I run phpunit i get the error:
Error: Call to undefined method Tests\Feature\QueueJobCommandTest::artisan()
Any help as to why TestCase::artisan()
is undefined woudl be greatly apprecated.