Muutke küpsiste eelistusi

Learn CakePHP: With Unit Testing 2nd ed. [Pehme köide]

  • Formaat: Paperback / softback, 114 pages, kõrgus x laius: 235x155 mm, kaal: 2234 g, 18 Illustrations, color; 18 Illustrations, black and white; XXIV, 114 p. 36 illus., 18 illus. in color., 1 Paperback / softback
  • Ilmumisaeg: 22-Aug-2016
  • Kirjastus: APress
  • ISBN-10: 1484212134
  • ISBN-13: 9781484212134
Teised raamatud teemal:
  • Pehme köide
  • Hind: 23,68 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 27,86 €
  • Säästad 15%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 2-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 114 pages, kõrgus x laius: 235x155 mm, kaal: 2234 g, 18 Illustrations, color; 18 Illustrations, black and white; XXIV, 114 p. 36 illus., 18 illus. in color., 1 Paperback / softback
  • Ilmumisaeg: 22-Aug-2016
  • Kirjastus: APress
  • ISBN-10: 1484212134
  • ISBN-13: 9781484212134
Teised raamatud teemal:
Accelerate your development of PHP applications using the popular CakePHP web application development framework and unit testing. This short book shows you how to carry out test-driven development with fixtures, model tests, controller tests, mocks, and test suites. Learn CakePHP contains all you need to get started with the CakePHP framework to build faster, better PHP-based web applications.

You'll learn about unit testing and how to implement it in CakePHP. This approach to coding leads to better code, better applications, and better programming habits. With this knowledge your PHP skills will go from strength to strength allowing you to write more and improved code. 



What you'll learn

What is unit testing and CakePHP and how to put the two together What is clean coding What is TDD and the development cycle using this approach How to work with fixtures, model tests, text callbacks, controller tests, and more How to do mocks, test suites, testing from the command line and more How to work with code coverage, fixtures data, and private methods



Who this book is for This book is for experienced PHP programmers and web developers who have little or no experience using CakePHP and/or unit testing.  
About the Author xv
About the Technical Reviewer xvii
Acknowledgments xix
Introduction xxi
About the Book xxiii
Chapter 1 What Is CakePHP?
3(6)
Main Features
3(3)
Short Learning Curve
4(1)
Convention over Configuration
4(1)
Easy Installation
4(1)
MIT Licensing
4(1)
Automatic Code Generation
4(1)
Built-in Validation
5(1)
MVC Architecture
5(1)
Clean URLs and Routes
5(1)
Flexible Caching
5(1)
Built-in Localization
5(1)
Integrated Unit Testing
6(1)
And More
6(1)
Summary
6(3)
Chapter 2 What Is Unit Testing?
9(6)
From Manual Testing to Unit Tests
9(1)
Arguments
9(2)
Argument #1 It's Impossible to Test All Variations
10(1)
Argument #2 Writing Tests Takes Too Much Time
10(1)
Argument #3 Writing Tests Is Hard
10(1)
Argument #4 I Don't Need Tests; I Know My Code
10(1)
Argument #5 It Is Just a Waste of Time
10(1)
Argument #6 The Tests Might Have Their Own Bugs
11(1)
Argument #7 Development Breaks Tests
11(1)
Why Should We Write Tests?
11(2)
Test Functionality
11(1)
Refactoring
12(1)
Getting Fast Feedback
12(1)
Quality Code
12(1)
Use the Best of Your Brain
12(1)
Save Time and Money
13(1)
Summary
13(2)
Chapter 3 Clean Code
15(4)
How to Write Clean Code
15(2)
Comments
15(1)
Naming
16(1)
Methods
16(1)
Code Formatting
16(1)
MVC
16(1)
How Tests Help in Writing Clean Code
17(1)
Planning
17(1)
Refactoring
17(1)
Summary
17(2)
Chapter 4 Test-Driven Development
19(4)
PHP TDD Tools
19(1)
PHPUnit
19(1)
Codeception
19(1)
SimpleTest
19(1)
Atoum
20(1)
Selenium
20(1)
TDD Development Cycle
20(1)
Step #1 Write Test
20(1)
Step #2 Write Code
20(1)
Step #3 Refactor
20(1)
Step #4 Test Again
21(1)
Step #5 Write Code for New Features
21(1)
Summary
21(2)
Chapter 5 Development Cycle
23(6)
Agile
23(2)
The Agile Manifesto
23(1)
12 Principles Behind the Manifesto
24(1)
How CakePHP Supports Agile Development
24(1)
The Agile Roadmap to Value
25(1)
Product Vision
25(1)
Product Roadmap
25(1)
Release Plan
25(1)
Sprint Planning
25(1)
Daily Meetings
25(1)
Sprint Review
26(1)
Sprint Retrospective
26(1)
Summary
26(3)
Chapter 6 Preparing for Testing
29(20)
Installing
29(6)
Install Webserver
29(1)
Install MySQL
30(1)
Install PHP
30(1)
Post Installation
31(1)
Install Composer
32(1)
Install CakePHP
32(1)
Installing PHPUnit
33(1)
Install phpMyAdmin
34(1)
Check Your Test Setup
34(1)
Preparing
35(12)
Set Debug Level
35(1)
Set Up Test Database
35(7)
Set Up Session Handling
42(1)
Create the Default Layout
42(1)
CakePHP Models
42(2)
CakePHP Controllers
44(1)
CakePHP Views
44(1)
Baking
44(2)
Clean It Up
46(1)
Let's Play
46(1)
Summary
47(2)
Chapter 7 Fixtures
49(10)
Creating Fixtures
49(6)
On the Fly
49(4)
Importing the Existing Model Schema
53(2)
Loading Fixtures into Your Tests
55(2)
Summary
57(2)
Chapter 8 Model Tests
59(8)
Names of Test Functions
61(1)
Assertions
61(1)
Fail First
61(1)
Passing Test
62(1)
Tests and Fat Models
63(1)
Test Callbacks
63(1)
Summary
64(3)
Chapter 9 Controller Tests 1
67(14)
Overview of the Baked Controller
67(5)
The Magic Behind Bake
72(1)
Creating Controller Tests
72(4)
About Integration Tests
76(1)
Assertion Methods
76(1)
Setting Request Data
77(1)
Summary
78(3)
Chapter 10 Mocks
81(8)
Mocking Sessions
81(1)
Mocking Model Methods
82(1)
Expects Method
83(1)
A More Complex Mock Example
84(1)
Mocking Core PHP Functions
85(2)
Summary
87(2)
Chapter 11 Controller Tests 2
89(6)
Testing with Authentication
89(2)
Testing JSON Response
91(2)
Summary
93(2)
Chapter 12 Test Suites
95(4)
Using TestSuite
95(1)
Using phpunit.xml
96(1)
Summary
96(3)
Chapter 13 Testing from Command Line
99(6)
Debug Messages
99(1)
Run All Tests
99(1)
Run Test Suites
99(1)
Run All Tests in a File
100(1)
Filtering Test Cases
100(1)
Understanding a Failing Test's Output
100(3)
Interrupting Tests
103(1)
Summary
103(2)
Chapter 14 Goodies
105(6)
Code Coverage
105(2)
Fixtures Data
107(1)
Testing Private Methods
107(1)
Testing Views
108(1)
Testing Components
108(1)
Testing Helpers
109(1)
Testing Plugins
110(1)
Summary
110(1)
Appendix A References by
Chapter
111(2)
What Is Unit Testing?
111(1)
Clean Code
111(1)
Test-Driven Development
111(1)
Development Cycle
112(1)
Others
112(1)
Index 113
rrd started to code for the web in plain HTML in 1998 at the college. As the web evolved, he turned to PHP, then to Javascript. As mobile technologies arrived, he started to play with Java for android development.Hes a big fan of CakePHP and jQuery frameworks, open source, and pizza. All of them are there in his web development.