oliverdavies.uk/src/pages/drupal-testing.mdx

80 lines
3 KiB
Plaintext
Raw Normal View History

2022-10-07 08:14:10 +00:00
---
2023-01-01 16:47:23 +00:00
layout: ~/layouts/PageLayout.astro
2022-10-07 08:14:10 +00:00
title: Introduction to Automated Testing and Test-Driven Development with Drupal
---
2023-04-19 17:00:00 +00:00
export const drupalVersions = "9 and 10";
2022-10-07 08:14:10 +00:00
export const prices = {
early: "395.00",
full: "495.00",
2023-04-19 17:00:00 +00:00
};
2022-10-07 08:14:10 +00:00
2023-04-19 17:00:00 +00:00
export const isEarlyBird = true;
2022-10-07 08:14:10 +00:00
2023-04-19 17:00:00 +00:00
export const nextDate = "2022-04-04";
2022-10-07 08:14:10 +00:00
export const testimonials = [
{
2023-04-19 17:00:00 +00:00
name: "Scott Euser, Head of Web Development",
image: "/images/scott-euser.jpg",
text: "Oliver really knows his stuff. Whether you are just starting out or looking to take your knowledge to the next level, his patient and clear way of explaining will help get you there.",
2022-10-07 08:14:10 +00:00
},
2023-04-19 17:00:00 +00:00
];
2022-10-07 08:14:10 +00:00
Are you a Drupal Developer who wants to learn about automated testing and test-driven development, or do you manage a development team that you'd like to train?
I've delivered large Drupal projects using automated tests and test-driven development for custom functionality, and maintain Drupal modules with thousands of installations whilst using their tests to ensure working code and prevent regressions.
I offer an interactive full-day workshop (previously presented at DrupalCamp London, and remotely for DrupalCamp NYC) that provides an introduction to automated testing in Drupal and how to utilise test-driven development - which I've updated specifically for Drupal {drupalVersions}.
## Contents
2023-04-19 17:00:00 +00:00
- What is automated testing, and why write tests?
- What types of tests are available in Drupal?
- Outside-in vs. inside-out testing.
- Configuring Drupal and PHPUnit to run tests locally.
- Exercise: writing tests for existing Drupal core functionality.
- Exercise: adding tests to an existing custom module.
- What is test-driven development?
- Exercise: writing a new Drupal module from scratch with test-driven development.
- Q&A
2022-10-07 08:14:10 +00:00
<hr />
## Dates and prices
The workshop is currently only available remotely, and the next available date is <span class="font-bold">{new Date(nextDate).toLocaleDateString('en-GB', { day: 'numeric', month: 'long', year: 'numeric', })}</span>.
Seats are available at <span class="font-bold">{isEarlyBird ? `an early bird price of £${prices.early}` : `a price of £${prices.full}`}</span>, with a 10% discount for bulk orders of 5 or more seats.
<div class="mt-6">
2023-04-19 17:00:00 +00:00
<a
class="inline-flex items-center py-3 px-6 text-base font-medium text-white no-underline rounded-md duration-200 ease-in-out hover:bg-white focus:bg-white bg-blue-primary transition-color hover:text-blue-primary focus:text-blue-primary"
href="https://buy.stripe.com/6oE3cW4Su7DA1t6144"
>
2022-10-07 08:14:10 +00:00
Book your seat &rarr;
</a>
</div>
<hr />
## Testimonials
{testimonials.map(testimonial => (
2023-04-19 17:00:00 +00:00
2022-10-07 08:14:10 +00:00
<div>
<blockquote class="mt-4">
{testimonial.text}
</blockquote>
<footer class="flex items-center space-x-4 space-x-reverse">
<span class="text-base">{testimonial.name}</span>
<span class="order-first">
<img width="40" height="40" class="w-10 h-10 rounded-full border" src={testimonial.image} />
</span>
</footer>
2023-04-19 17:00:00 +00:00
2022-10-07 08:14:10 +00:00
</div>
))}