Leanpub Header

Skip to main content

Laravel Testing Decoded (Italian)

Il libro sul testing che stavi aspettando.

This book is a translation into Italian of Laravel Testing Decoded which was originally written in English

Minimum price

$20.00

$25.00

You pay

$25.00

Authors earn

$20.00
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
About

About

About the Book

L'ho visto tante, troppe volte. La tua applicazione cresce e allo stesso modo la codebase comincia ad appesantirsi. Senza nessun test a consolarti. Molto prima di quanto tu possa immaginare diventa impossibile anche pensare di rimediare ad alcuni errori.

Proprio in questi momenti cominci a pensare che si, forse è il caso di cominciare ad imparare qualcosa di più sul testing. Sicuramente avrai già letto qualche libro dedicato all'argomento, ma quanto c'è davvero tra il dire e il fare? Tanto.

Uno dei grandi problemi del testing è che può essere confusionario, all'inizio, se non hai un metodo. Una delle cose più difficili del testing è proprio capire "come" e "cosa" testare, non come scrivere un test.

Insomma, c'è bisogno di fare pratica, per arrivare a quello che viene detto un momento "aha".

Questo libro non parla solo di testing, ma parla anche di Laravel. Nello specifico, introduce alcuni concetti validi per qualsiasi linguaggio, per poi "declinarli" nella pratica tramite lo studio (e l'uso) di alcuni tool dedicati al nostro framework preferito.

Tutti gli eventuali aggiornamenti, ovviamente, saranno gratuiti.

Share this book

This book is a translation into Italian of Laravel Testing Decoded which was originally written in English

Author

About the Authors

JeffreyWay

Jeffrey is a web developer, writer, speaker, and creator of Laracasts.com. He spends his days digging into cutting edge technologies, and finding new ways to teach complicated concepts.

Francesco Malatesta

Francesco is a 26 years old Web Developer from Vasto, in Italy. Loves PHP, Food, Travels. He also writes for HTML.IT (the first Italian website about programming and web design) sometimes.

Contents

Table of Contents

  • Benvenuto
    • È Cominciata!
    • Questo Libro è Davvero Adatto a Me?
    • Perché Proprio Laravel?
    • Esercizi
    • Errata
    • Come Usare Questo Libro
    • Contatti
  • Nel Grande Ignoto
  • Capitolo 1: Testa Tutto
    • Si, tu fai già dei test.
    • 6 Pro del TDD (Test Driven Development)
      • 1. Sicurezza
      • 2. Contributi
      • 3. Mettersi nei Panni del “Ragazzo Più Grande”
      • 4. La testabilità migliora l’architettura.
      • 5. Documentazione
      • 6. È Divertente
    • Cosa Dovrei Testare?
    • Una Nota Importante
    • Sei Segni di un Codice Non Testabile
      • 1. Operatore “new”
      • 2. Costruttori “Sbagliati”
      • 3. E, e, e…
        • Quattro Modi di Capire Quando una Classe Ha Troppe Responsabilità
      • 4. Troppi Percorsi? È Tempo di Polimorfismo!
      • 5. Troppe Dipendenze
      • 6. Troppi Bug
    • Il “Jargon” del Testing
      • Unit Testing
      • Model Testing
      • Integration Testing
      • Functional Testing
      • Acceptance Testing
    • Relax
  • Capitolo 2: Introduzione a PHPUnit
    • Installazione
      • Rendere i package disponibili globalmente
    • Le prime assertions
      • Analisi della classe Test
      • assertTrue
      • assertEquals
      • assertSame
      • assertContains
      • assertArrayHasKey
      • assertInternalType
      • assertInstanceOf
      • Asserzione di eccezioni
    • Conclusioni
  • Capitolo 3: Configurare PHPUnit
    • Opzioni
      • Technicolor Time
      • Bootstrapping
      • Formati di Output
    • File di Configurazione XML
    • Testing continuo
      • Osservare i file
      • Trigger di più file
      • Consigli specifici per Vim
    • Conclusioni
  • Capitolo 4: Un PHPUnit meno… logorroico
    • Importare asserzioni come funzioni
    • Un PHPUnit… più Laravel
  • Capitolo 5: L’ABC dello Unit Testing
    • I dubbi
    • Unit Testing
    • Arrange, act ed assert
    • Testare in isolamento
    • I test non dovrebbero essere dipendenti da un certo ordine
    • Test-Driven Development
    • Behavior-Driven Development
    • Testare una funzione
      • Slime e Generalizzazione
        • Slime
        • Generalizzazione
      • Passare i test
    • Testing delle classi
      • Refactoring dei test
      • Refactoring del codice di produzione
      • Polimorfismo
        • Estendibilità
        • Mock
    • Progetto completato!
      • Codice finale
    • Conclusioni
  • Chapter 6: Testing dei Model
    • Cosa testare?
    • Accessor e Mutator
      • Gli anni di un gatto
      • Password hashing
    • Metodi custom
    • Metodi con query semplici
    • Validazioni
      • Helper
    • Factory
    • Laravel Test Helper
      • Factory
      • Override
      • Model
      • Test helper
        • assertValid e assertNotValid
        • Asserzione di relazioni
    • Conclusione
  • Capitolo 7: Semplificare i propri test con Mockery
    • Mocking?
    • Installazione
    • Il Dubbio
      • Dependency Injection
    • La Soluzione
      • Mock semplice di oggetti
      • Valori di ritorno dei metodi
    • Aspettative
    • Mock parziali
    • Hamcrest
    • Conclusioni
  • Capitolo 8: Database di Test
    • Test Database
    • Specifica dell’Ambiente
    • Chiamare Artisan dai Test
    • Prova Tu!
    • Database in Memoria
    • Conclusioni
  • Capitolo 9: Un Gioco di Scambi
    • Mockery
    • Testing
      • Mocking di Eventi
    • Conclusioni
  • Capitolo 10: Testing dei Controller
    • Cosa fa un controller?
    • I 3 passi per testare un controller
    • L’Hello World del controller testing
      • L’overloading è tuo amico
      • Chiamare le action dei controller
    • Le asserzioni di Laravel
    • Mocking del database
      • Refactoring!
      • Il Container IoC
    • Redirect
    • Percorsi
    • Repository
    • Struttura
      • Aggiornamento dei test
    • Crawling del DOM
      • Assicurarsi che una view contenga dei testi
      • Traversing Base
        • Fetch in base alla posizione
        • Fetch (primo o ultimo)
        • Fetch di elementi “fratelli”
        • Fetch di elementi child
      • Fetch di contenuti testuali
    • Form
    • Conclusioni
  • Capitolo 11: Il Container IoC
    • Cosa? Dependency Injection?
      • Injection nel Costruttore
      • Injection da Setter
    • Risoluzione
      • Soluzione 1: Default
      • Soluzione 2: Risoluzione (o Resolving)
    • Binding con App
        • Interfacce
        • Esempio 2: Automatic Resolution
      • Extra
    • Conclusioni
  • Capitolo 12: Uso dei Comandi di Artisan nel Testing
    • ABC dei Comandi
      • Scaffolding
      • Parametri
      • Opzioni
      • Principio di Isolamento delle Responsabilità
    • Esercizi
      • Creare il Package
      • Generazione del Comando
      • Service Provider
      • Test dei Comandi Artisan
        • Planning
        • Aspettative
        • Dependency Injection
        • Classe Generator
        • Far Passare il Test
      • Testing del Generatore
    • Conclusioni
  • Capitolo 13: Test di API
    • Le API in Laravel
      • Tre Componenti per Scrivere un’API in Laravel
        • 1. Autenticazione
        • 2. Prefisso delle Route
        • 3. Output in JSON
    • Testing di API
      • Usa un Database in Memoria
      • Migration del Database per Ogni Test
      • Attivazione dei Filtri
      • Imposta l’Utente da Usare
    • Esempi di Test
      • Test 1: l’utente deve essere autenticato
      • Controlla gli Errori
      • Fetch di Tutte le Foto dell’Utente
        • Refactoring
      • Update di una Foto
        • Factory
      • Specifica di Opzioni
    • Conclusioni
  • Capitolo 14: Acceptance Testing con Codeception
    • Qualcosa di semplice
    • Testing Refresher
      • Acceptance testing
    • Installazione
      • Installazione Globale
      • Installazione Locale
    • Bootstrap
    • Configurazione degli Acceptance Test
    • Generare un Test
      • Creazione Manuale
      • Creazione con Generatore
        • Analisi del Comando
      • Scrittura del Primo Test
      • Esecuzione dei Test
    • Conclusioni
  • Capitolo 15: Autenticazione e Codeception
    • La Feature
    • Dalla feature a Codeception
    • Registrazione delle route
      • Costruzione del form
      • Risorse
      • Autenticazione dell’Utente
        • Aggiunta del Database di Test
      • Credenziali non Valide
    • Conclusioni
  • Capitolo 16: Functional Testing con Codeception
    • Il Modulo Laravel4
      • Il Modulo DB
    • Update di TestGuy
    • Registrazione di un Utente
    • Conclusioni
  • Capitolo 17: Continuous Integration con Travis CI
    • Hello Travis!
      • 1. Connessione
      • 2. Registra gli Hook
      • 3. Configura
    • Configurazione del Build
      • Le Basi Assolute
      • Boostrap
      • Registrazione delle Dipendenze
      • Notifiche
        • Disattiva le Notifiche
        • Imposta i Destinatari
        • IRC
    • Conclusioni
  • FAQ - Domande Frequenti
    • 1. Come posso testare le funzioni globali (global functions)?
      • Mock
      • Il “trucco” dei namespace
    • 2. Come creo un dump SQL per codeception?
    • 3. Come posso fare dei test su metodi protected?
    • 4. Secondo te devo testare i getter e i setter?
    • 5. Perché PHPUnit ignora i miei filtri?
    • 6. Posso fare il mock di un metodo in una classe che sto testando?
      • Partial mock tradizionali
      • Partial mock passivi
    • 7. Preferisco usare gli underscore nei nomi dei miei test. Va bene?
  • Arrivederci!
    • Prima di Andartene…

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub