Зарегистрироваться
Восстановить пароль
FAQ по входу

Lively Michael. Instant Hands-on Testing with PHPUnit How-to

  • Файл формата pdf
  • размером 959,93 КБ
Lively Michael. Instant Hands-on Testing with PHPUnit How-to
Packt Publishing Ltd., 2013. — 83 p. — ISBN: 978-1-78216-958-1.
Целевая аудитория: опытные разработчики на PHP.
Проблемы и ошибки программного обеспечения были всегда, они появлялись настолько часто, что разработчики придумали тестирование приложений как способ избавить себя от ошибок на стадии разработки. PHPUnit - это фреймворк для тестирования приложений на PHP. В данном руководстве вы найдёте многочисленные функции, предоставляемые PHPUnit, которые смогут вам гарантировать правильное функционирование вашего приложения и его компонентов.
В книге рассматриваются следующие темы:
✔ установка PHPUnit;
✔ пишем первый тест;
✔ настройка фреймворка;
✔ добавляем PHPUnit в ваш проект;
✔ используем тестирование зависимостей, провайдеров, объектов;
✔ тестирование работы базы данных и многое другое.
Преимущества:
➕ небольшой объём;
➕ многочисленные примеры и функции фреймворка.
Недостатки:
➖ старая версия PHP.
Instant Hands-on Testing with PHPUnit How-to Book Description:
No developer wants to accept the inherent difficulty of writing software as an excuse for not finding the bugs in our code before anyone else does. PHPUnit is a framework that was created to allow developers to solve that very problem. It provides a feature-rich environment with most of the tools necessary to provide adequate tests for any project.
Instant Hands-on Testing with PHPUnit How-to provides a thorough overview of the functionality provided by the PHPUnit framework. It shows how the plethora of features in the framework can be used to write tests for real world projects to ensure they function and will continue to function in the ways that you expect.
This book will show how you can set up the scaffolding necessary to run unit tests in your project with PHPUnit. It will walk you through the process of how to write a basic test and how to maintain your project’s test suite. You will learn how to use some of the more advanced features of PHPUnit and then see how you can use mock objects to isolate the code you are testing. We will then discover how to create tests that verify your interaction with databases and even see how you can use PHPUnit to understand which code you are actually testing.
At the end of the book you will have all of the basic understanding necessary to begin adding tests to your project. This book provides a great foundation for becoming a expert at writing unit tests.
What you will learn from this book
- Bootstrap PHPUnit into your project in a standard way
- Understand the anatomy of a PHPUnit test
- Create data providers to quickly create tests against multiple datasets
- Use PHPUnit’s skeleton generator to generate code from tests or tests from code
- Declare test dependencies to help isolate test failures
- Test abstract classes, traits, and protected methods
- Test database interactions in your unit tests
  • Чтобы скачать этот файл зарегистрируйтесь и/или войдите на сайт используя форму сверху.
  • Регистрация