Domain\Billet\BilletTest::test_create_billet PHP Method

test_create_billet() public method

public test_create_billet ( )
    public function test_create_billet()
    {
        $billet = factory(Billet::class)->create();
        $this->assertInstanceOf(Billet::class, $billet);
        $this->assertInstanceOf(Student::class, $billet->student);
        $this->assertInstanceOf(Carbon::class, $billet->created_at);
        $this->assertInstanceOf(Carbon::class, $billet->updated_at);
        $this->assertInstanceOf(Carbon::class, $billet->due_date);
        $this->assertInstanceOf(Carbon::class, $billet->new_due_date);
        $recipient = BilletAssignor::first();
        $this->seeInDatabase('billets', ['id' => $billet->id, 'payment_of_fine' => $recipient->payment_of_fine, 'interest' => $recipient->interest, 'is_interest' => $recipient->is_interest, 'days_protest' => $recipient->days_protest]);
    }