001: Introduction to Test Driven Development (TDD) creating a Queue - Abstract Data Type class (PHP
In the first episode of the Testing All The Things Screencast Mark Bradley (https://twitter.com/braddle) will introduce the concepts of Test Driven Development (TDD) to drive out the implementation a Queue Abstract Data Type in PHP using PHPUnit as the test framework.
During this tutorial video Mark will follow strict rules of Test Driven Development (TDD) always writing a test before we write any code.
10 Red (Write a failing test)
20 Green (Make the test pass)
30 Refactor (Clean up the code)
40 GOTO 10
While writing code Mark will only write just enough code to make the test pass, even if this includes hard coded return values or variables that will not exist in our final implementation.
Once we have written a few test we and refactoring steps to clean up the code as we go. We only do any refactoring when all tests are passing. We refactor test and production code.
The code produced during this episode can be found on GitHub:
https://github.com/testingallthethings/001-queue
You can follow me on twitter: https://twitter.com/braddle
** Please Rate, Review, Subscribe and Share these videos **
00:00 Introduction
01:20 To the code
01:30 Test 1 - Empty queue is empty
05:50 Test 2 - Add something and queue is not empty
10:47 Test 3 - Empty set size is zero
12:37 Test 4 - Add something to queue size is one
15:04 Test 5 - Add another thing to queue size is two
18:40 Refactor 1 - Remove duplicate knowledge
22:40 Refactor 2 - Add SetUp/BeforeEach to tests
27:11 Test 6 - Pop from empty queue
32:24 Test 7 - Pop from queue of one
36:26 Test 8 - Pop from queue of three
45:58 Test 9 - Pop and Add to the queue
53:18 Refactor 3 - Add three to SetUp/BeforeEach
56:00 Refactor 4 - Extract function for find next spot
58:21 Outro
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «001: Introduction to Test Driven Development (TDD) creating a Queue - Abstract Data Type class (PHP», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.