Skip to content

Commit 9ad1106

Browse files
committed
Add "TY" article
1 parent 28f07af commit 9ad1106

6 files changed

Lines changed: 63 additions & 17 deletions

File tree

blog/assert-and-expect.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ assertTrue(...);
2020

2121
All these calls lead to one place — the `Assert` facade with ~2300 lines.
2222

23-
::: info 🤔
24-
Did you know that PHPUnit has neither a standalone `expectException()` function nor a method with the same name in the `Assert` facade?
23+
::: info 🤔 Did you know that PHPUnit has neither a standalone `expectException()` function nor a method with the same name in the `Assert` facade?
2524
In test code, you can only write `$this->expectException()`.
2625
:::
2726

@@ -48,8 +47,7 @@ function simpleTest(): void
4847
}
4948
```
5049

51-
::: tip 🧠
52-
But now we face a tricky question with lots of room for imagination: **how do we provide a convenient API for assertions?**
50+
::: tip 🧠 But now we face a tricky question with lots of room for imagination: **how do we provide a convenient API for assertions?**
5351
:::
5452

5553
Sure, we could eventually create a hundred functions, a trait, and a base class with PHPUnit-like syntax... But hey, let's try to find something better first!
@@ -82,8 +80,7 @@ Assert::that($foo)->greaterThan(42);
8280
Assert::true($foo > 42);
8381
```
8482

85-
::: warning ☝
86-
This led us to a strategic decision: provide only "complex" assertions that save characters or entire lines of code.
83+
::: warning ☝ This led us to a strategic decision: provide only "complex" assertions that save characters or entire lines of code.
8784
:::
8885

8986
---
@@ -171,8 +168,7 @@ We're also trying out how it would look in an IDE. Will this be useful?
171168

172169
There's also an option to output each assertion as a nested checkmark in the test tree (like DataSet), but I think that would be too cluttered.
173170

174-
::: tip ☝
175-
It might seem like there are only more open questions. But over time, not only questions appear, but expertise grows too: each answer to a closed question is backed by mental or practical experience.
171+
::: tip ☝ It might seem like there are only more open questions. But over time, not only questions appear, but expertise grows too: each answer to a closed question is backed by mental or practical experience.
176172
:::
177173

178174
The final word on assert/expect hasn't been said. But while Testo hasn't reached a stable release, we can afford any experiments.

blog/ty.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "TY"
3+
date: 2026-01-17
4+
description: "Your support is Testo's key ingredient"
5+
image: /blog/ty/img-0.jpg
6+
author: Aleksei Gagarin
7+
---
8+
9+
# TY
10+
11+
I started creating Testo for myself because no existing testing framework could meet my needs.
12+
13+
However, after I talked about it at a PHP Random Beer meetup, I realized that the upcoming Testo features resonated with my fellow drinkers, and that I wasn't the only one with complaints about existing frameworks.
14+
15+
![PHP Random Beer](/blog/ty/img-1.jpg)
16+
17+
Then the information about Testo [leaked to a local "plausible" news outlet](https://t.me/php_fart/282) and others started learning about the project. That same day, my first sponsor reached out.
18+
19+
::: danger 💥 I saw the demand and I felt the support. This changed my attitude towards the project.
20+
:::
21+
22+
What I thought would be "thrown together in a few evenings" at the start turned into something bigger: today Testo is a **full-fledged testing framework** with a well-thought-out architecture, its own assertion system, and even its own IDE plugin. Who would have thought it would take off like this?
23+
24+
Now, with the launch of the landing page and documentation, I see your stars coming into [Testo's Github](https://github.com/php-testo/testo): you see the project's vision and you support it.
25+
26+
27+
**Thank you, this is invaluable!**

public/blog/ty/img-0.jpg

1.14 MB
Loading

public/blog/ty/img-1.jpg

282 KB
Loading

ru/blog/assert-and-expect.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ assertTrue(...);
2020

2121
Все эти вызовы ведут в одно место — в фасад `Assert` на ~2300 строк.
2222

23-
::: info 🤔
24-
Но знаете ли вы, что в PHPUnit нет ни отдельной функции `expectException()`, ни одноимённого метода в фасаде `Assert`?
25-
В коде теста можно написать только `$this->expectException()`.
23+
::: info 🤔 Но знаете ли вы, что в PHPUnit нет ни отдельной функции `expectException()`, ни одноимённого метода в фасаде `Assert`?
24+
В тесте можно написать только `$this->expectException()`.
2625
:::
2726

2827
Это потому, что в PHPUnit тесты наследуются от `TestCase` (~2400 строк, расширяет `Assert`), в котором хранится и обрабатывается всё состояние теста. Мне это напоминает архитектуру Symfony Console, хуже которой я пока не встречал.
@@ -48,8 +47,7 @@ function simpleTest(): void
4847
}
4948
```
5049

51-
::: tip 🧠
52-
Но теперь возникает непростой вопрос с очень широким простором для фантазии: **как предоставить удобное API для проверок?**
50+
::: tip 🧠 Но теперь возникает непростой вопрос с очень широким простором для фантазии: **как предоставить удобное API для проверок?**
5351
:::
5452

5553
Да, мы можем в будущем сделать сотню функций, трейт и базовый класс с синтаксисом как у PHPUnit... Но эй, давайте сначала попробуем нащупать что-то получше!
@@ -81,8 +79,7 @@ Assert::that($foo)->greaterThan(42);
8179
Assert::true($foo > 42);
8280
```
8381

84-
::: warning ☝
85-
Это привело нас к стратегическому решению: предоставлять только "сложные" проверки, которые экономят знаки или целые строки кода.
82+
::: warning ☝ Это привело нас к стратегическому решению: предоставлять только "сложные" проверки, которые экономят знаки или целые строки кода.
8683
:::
8784

8885
---
@@ -172,8 +169,7 @@ public function checkIterableTraitMethods(): void
172169

173170
Есть ещё вариант выводить каждый ассерт как вложенная галочка в дереве тестов (как DataSet), но думаю, это будет сильно перегружено.
174171

175-
::: tip ☝
176-
Может показаться, что открытых вопросов становится только больше. Но со временем появляются не только вопросы, но также растёт экспертиза: каждый ответ на закрытый вопрос подкреплён ментальными или практическими опытами.
172+
::: tip ☝ Может показаться, что открытых вопросов становится только больше. Но со временем появляются не только вопросы, но также растёт экспертиза: каждый ответ на закрытый вопрос подкреплён ментальными или практическими опытами.
177173
:::
178174

179175
Точка в assert/expect не поставлена. Но пока Testo не релизнулся в стабильный тег, мы можем позволить себе любые эксперименты.

ru/blog/ty.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "СПС"
3+
date: 2026-01-17
4+
description: "Ваша поддержка — важнейший ингредиент Testo"
5+
image: /blog/ty/img-0.jpg
6+
author: Алексей Гагарин
7+
---
8+
9+
# СПС
10+
11+
Я начал создавать Testo для себя, поскольку ни одни существующий фреймворк тестирования не мог закрыть мои потребности.
12+
13+
Однако, после того, как я рассказал об этом на встрече PHP Random Beer, я понял, что будущие фичи Testo отзываются в сердцах собутыльников, да и в целом не только у меня одного есть претензии к существующим фреймворкам.
14+
15+
![PHP Random Beer](/blog/ty/img-1.jpg)
16+
17+
Затем информация про Testo [утекла в Пыхораму](https://t.me/php_fart/282) и о проекте начали узнавать остальные. В этот же день ко мне постучался первый спонсор.
18+
19+
::: danger 💥 Я увидел потребность и я почувствовал поддержку. Это изменило моё отношение к проекту.
20+
:::
21+
22+
То, что я думал “накидаю за несколько вечеров” на старте, превратилось в нечто большее: сегодня Testo — это **полноценный фреймворк тестирования** с продуманной архитектурой, самостоятельной системой проверок и даже со своим плагином для IDE. Кто бы мог подумать, что оно так попрёт?
23+
24+
Теперь, с запуском лендинга и документации, я вижу, что в [Github Testo](https://github.com/php-testo/testo) стали залетать ваши звёзды: вы видите идею проекта и вы её поддерживаете.
25+
26+
27+
**Спасибо, это неоценимо!**

0 commit comments

Comments
 (0)