Domain\Billet\BilletRepositoryTest::test_delete PHP Метод

test_delete() публичный Метод

public test_delete ( )
    public function test_delete()
    {
        $repo = App::make(BilletRepository::class);
        $billet = factory(Billet::class)->create();
        $delete = $repo->delete($billet->id);
        $trashed = $repo->onlyTrashed()->get($billet->id);
        $this->assertEquals(1, $delete);
        $this->assertInstanceOf(Carbon::class, $trashed->deleted_at);
        $this->assertInstanceOf(Billet::class, $trashed);
        $this->setExpectedException(RepositoryException::class);
        $repo->withoutTrashed()->get($billet->id);
    }