万本电子书0元读

万本电子书0元读

顶部广告

Instant Hands-on Testing with PHPUnit How-to电子书

售       价:¥

4人正在读 | 0人评论 9.8

作       者:Mike Lively

出  版  社:Packt Publishing

出版时间:2013-05-23

字       数:66.1万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Filled with practical, step-by-step instructions and clear explanations for the most important and useful tasks. This is a Packt Instant How-to guide, which provides concise and clear recipes for getting started with PHPUnit for performing code testing and improving code quality."Instant Hands-on Testing with PHPUnit How-to" is for PHP developers that have an appreciation for writing accurate code. If you are new to PHPUnit, it will give you a solid foundation for understanding how to use PHPUnit to write tests for your projects. If you already have a cursory understanding of PHPUnit it will whet your appetite for some of the more difficult-to-understand concepts in PHPUnit.
目录展开

Instant Hands-on Testing with PHPUnit How-to

Instant Hands-on Testing with PHPUnit How-to

Credits

About the Author

About the Reviewers

www.PacktPub.com

Support files, eBooks, discount offers and more

Why Subscribe?

Free Access for Packt account holders

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

1. Instant Hands-on Testing with PHPUnit How-to

Installing PHPUnit (Simple)

How to do it...

How it works...

There's more...

Installing PHPUnit using Composer

Installing PHPUnit on older versions of PHP

Writing your first test (Simple)

Getting ready...

How to do it...

How it works...

There's more...

Class names

Running tests (Simple)

How to do it...

How it works...

There's more...

Command line options

--colors

--stop-on-error and --stop-on-failure

--debug

--strict

Configuring PHPUnit (Simple)

How to do it...

How it works...

There's more...

Additional configurations

Using phpunit.xml.dist

Adding PHPUnit to your project (Simple)

Getting ready...

How to do it…

How it works…

There's more...

Generating tests from code (Advanced)

Getting ready

How to do it...

How it works...

There's more...

Using @assert to generate additional code

Using the Skeleton Generator for test-driven development

Using test fixtures (Simple)

How to do it...

How it works...

There's more...

Using data providers (Intermediate)

How to do it...

How it works...

Identifying test failures

Using test dependencies (Advanced)

How to do it...

How it works...

Multiple test dependencies

Multiple dependent tests

Using mock objects (Simple)

How to do it...

How it works...

There's more...

Thoughts on partial mocks

Ignoring parameters on method expectations

Stubbing exceptions

Stubbing multiple return values

Stubbing with callbacks

Using mock builders

Using alternative mock frameworks

Phake

Mockery

Testing abstract classes (Intermediate)

How to do it...

How it works...

Abstract classes in Phake

Testing traits (Intermediate)

How to do it...

How it works...

Testing exceptions and errors (Intermediate)

How to do it...

How it works...

There's more...

Testing output (Intermediate)

How to do it...

How it works...

There's more...

Testing protected and private methods (Intermediate)

How to do it...

How it works...

Private and protected methods

Testing database interaction (Advanced)

Getting ready

How to do it...

How it works...

There's more...

Alternate data sets

Flat XML data set

MySQL XML data set

YAML data set

Validating your data with queries

Viewing code coverage (Advanced)

Getting ready

How to do it...

How it works...

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部