售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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...
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜