Level 25
Try changing your class name from Categorytest to CategoryTest
1 like
This unit test is does not recognize at all?
<?php
namespace Tests\Unit\Categories;
//use PHPUnit\Framework\TestCase;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class Categorytest extends TestCase
{
use RefreshDatabase;
/** @test */
public function it_have_many_childrens()
{
$category = factory('App\Category')->create();
$category->childrens()->save(
factory('App\Category')->create()
);
$this->assertInstanceOf('App\Category', $category->childrens()->first());
}
}
Try changing your class name from Categorytest to CategoryTest
Please or to participate in this conversation.