App\Http\Controllers\AuthorsController::create PHP Method

create() public method

public create ( )
    public function create()
    {
        return view('authors.create');
    }

Usage Example

 public function testCreate_ok()
 {
     $ar = \Mockery::mock(AR::class)->makePartial();
     $av = \Mockery::mock(AV::class)->makePartial();
     $ac = new AC($ar, $av);
     $req = new Request();
     $ar->shouldReceive('create')->andReturn(149);
     $av->shouldReceive('create')->once()->with($req);
     $r = $ac->create($req);
     $this->assertInstanceOf(JsonResponse::class, $r);
     $this->assertSame(200, $r->getStatusCode());
     $this->assertSame(149, $r->getData());
 }