Skip to content

Instantly share code, notes, and snippets.

View MarceloHoffmeister's full-sized avatar
👨‍💻
light attracts more bugs

Marcelo Hoffmeister MarceloHoffmeister

👨‍💻
light attracts more bugs
View GitHub Profile
@MarceloHoffmeister
MarceloHoffmeister / settings.json
Last active February 25, 2021 23:42 — forked from diego3g/settings.json
JSON de configuração do VSCode
/**
extensões: GitLens, Vetur, ESLint, Prettier, Omni ou Dracula, Material Icon Theme,
StandardJS, Fonte Victor Mono, Rainbown Brackets Colorizer
*/
{
"editor.lineHeight": 24,
"editor.fontFamily": "Victor Mono",
"editor.fontLigatures": true,
"explorer.compactFolders": false,
// Aplica linhas verticais
@MarceloHoffmeister
MarceloHoffmeister / README.md
Last active September 11, 2020 18:52 — forked from Alymosul/README.md
[Laravel] Seeding data in testing as part of the application build | Semeando dados em testes como parte da construção do aplicativo

A trait SeedDatabase junto com a classe SeedDatabaseState dá ao seu projeto Laravel a habilidade de fazer a seed do banco de dados antes de rodar as test suites, o que melhora a velocidade e tona-se melhor do que executar as seeds do banco de dados antes de cada teste.

Além disso, tem a opção de executar seeds personalizadas em vez dos seeds que são chamados no método run() da classe DatabaseSeeder. Você pode conseguir isso da seguinte forma:

SeedDatabase trait along with SeedDatabaseState class gives your Laravel project the ability to seed the testing database once before running the full suite tests, which improves the speed of the tests than seeding the testing database before each test.

Also, it has the option to run custom seeders instead of the seeders that are called in the run() method of the DatabaseSeeder class you can achieve that as follows:

Testcase.php

@MarceloHoffmeister
MarceloHoffmeister / Response.php
Created December 4, 2020 14:28 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;