Files
progcode/web/public/assets/editorial/2018/php-test-boundary-2018.svg
T
huncode c72a72b8f3
Build and deploy / deploy (push) Successful in 14s
revise late 2018 editorial articles
2026-07-31 10:09:53 +03:00

39 lines
4.2 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 900" role="img" aria-labelledby="title desc">
<title id="title">Граница unit и integration тестов PHP</title>
<desc id="desc">Unit-тест заменяет репозиторий подставным объектом и проверяет правило сервиса. Integration-тест проходит через настоящий PDO или HTTP-адаптер к тестовому ресурсу.</desc>
<defs>
<linearGradient id="bg" x1="0" x2="1" y1="0" y2="1"><stop stop-color="#152943"/><stop offset="1" stop-color="#253350"/></linearGradient>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="5" orient="auto"><path d="M0,0 L10,5 L0,10z" fill="#8fd8ff"/></marker>
</defs>
<rect width="720" height="900" rx="30" fill="url(#bg)"/>
<text x="52" y="65" fill="#f8fbff" font-family="Arial, sans-serif" font-size="34" font-weight="700">Граница: правило и адаптер</text>
<text x="52" y="102" fill="#bfd1e7" font-family="Arial, sans-serif" font-size="22">Подмена полезна, но не проверяет ресурс</text>
<rect x="55" y="150" width="610" height="250" rx="20" fill="#1d3a59" stroke="#8fd8ff" stroke-width="3"/>
<text x="86" y="197" fill="#d5efff" font-family="Arial, sans-serif" font-size="27" font-weight="700">UNIT</text>
<rect x="88" y="228" width="158" height="86" rx="14" fill="#2e587b"/>
<text x="167" y="279" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="23" font-weight="700">TestCase</text>
<path d="M246 271 H321" stroke="#8fd8ff" stroke-width="4" marker-end="url(#arrow)"/>
<rect x="335" y="228" width="145" height="86" rx="14" fill="#27634f"/>
<text x="407" y="279" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="22" font-weight="700">сервис</text>
<path d="M480 271 H540" stroke="#d7c8ff" stroke-width="4" stroke-dasharray="9 8" marker-end="url(#arrow)"/>
<rect x="550" y="228" width="85" height="86" rx="14" fill="#564b86"/>
<text x="592" y="279" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="22" font-weight="700">fake</text>
<text x="86" y="361" fill="#b9d8f2" font-family="Arial, sans-serif" font-size="21">Проверяет локальное решение. SQL и HTTP остаются снаружи.</text>
<rect x="55" y="455" width="610" height="328" rx="20" fill="#193f36" stroke="#78e1ba" stroke-width="3"/>
<text x="86" y="503" fill="#cff9e6" font-family="Arial, sans-serif" font-size="27" font-weight="700">INTEGRATION</text>
<rect x="88" y="548" width="158" height="86" rx="14" fill="#2e587b"/>
<text x="167" y="599" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="23" font-weight="700">TestCase</text>
<path d="M246 591 H320" stroke="#8fd8ff" stroke-width="4" marker-end="url(#arrow)"/>
<rect x="335" y="548" width="145" height="86" rx="14" fill="#27634f"/>
<text x="407" y="585" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="22" font-weight="700">PDO / cURL</text>
<text x="407" y="612" text-anchor="middle" fill="#d5f7e8" font-family="Arial, sans-serif" font-size="18">адаптер</text>
<path d="M480 591 H540" stroke="#78e1ba" stroke-width="4" marker-end="url(#arrow)"/>
<rect x="550" y="548" width="85" height="86" rx="14" fill="#265b63"/>
<text x="592" y="584" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="18" font-weight="700">test</text>
<text x="592" y="611" text-anchor="middle" fill="#d6f4ff" font-family="Arial, sans-serif" font-size="18">DB/HTTP</text>
<text x="86" y="688" fill="#c9f0df" font-family="Arial, sans-serif" font-size="21">Проверяет договор с контролируемым ресурсом.</text>
<text x="86" y="726" fill="#a9d8c5" font-family="Arial, sans-serif" font-size="19">Один настоящий переход за тест — понятная причина падения.</text>
<line x1="360" y1="400" x2="360" y2="455" stroke="#7890ad" stroke-width="3" stroke-dasharray="8 8"/>
<text x="387" y="436" fill="#b8c9dc" font-family="Arial, sans-serif" font-size="18">граница подмены</text>
</svg>