Files
progcode/web/public/assets/editorial/2018/php-integration-contract-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

28 lines
2.9 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 720 900" role="img" aria-labelledby="title desc">
<title id="title">Контракт интеграционного теста PHP с базой данных</title>
<desc id="desc">PHPUnit передаёт данные в PDO-репозиторий, тот записывает и читает отдельную тестовую базу данных, после чего транзакция откатывается.</desc>
<defs>
<linearGradient id="bg" x1="0" x2="1" y1="0" y2="1"><stop stop-color="#11213a"/><stop offset="1" stop-color="#1d3655"/></linearGradient>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="5" orient="auto"><path d="M0,0 L10,5 L0,10z" fill="#84d5ff"/></marker>
</defs>
<rect width="720" height="900" rx="30" fill="url(#bg)"/>
<text x="52" y="65" fill="#f3f8ff" font-family="Arial, sans-serif" font-size="34" font-weight="700">Контракт: запись и чтение</text>
<text x="52" y="102" fill="#bfd0e4" font-family="Arial, sans-serif" font-size="22">Один путь через PDO и отдельную test DB</text>
<rect x="62" y="160" width="596" height="126" rx="18" fill="#203d60" stroke="#84d5ff" stroke-width="3"/>
<text x="360" y="211" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="30" font-weight="700">PHPUnit</text>
<text x="360" y="250" text-anchor="middle" fill="#d3efff" font-family="Arial, sans-serif" font-size="23">вход, ожидание, фикстура</text>
<path d="M360 286 V350" stroke="#84d5ff" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="62" y="370" width="596" height="142" rx="18" fill="#183952" stroke="#72e0bb" stroke-width="3"/>
<text x="360" y="425" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="30" font-weight="700">PDO-репозиторий</text>
<text x="360" y="464" text-anchor="middle" fill="#cbf5e6" font-family="Arial, sans-serif" font-size="23">SQL, типы, преобразование</text>
<path d="M360 512 V575" stroke="#84d5ff" stroke-width="5" marker-end="url(#arrow)"/>
<rect x="62" y="595" width="596" height="142" rx="18" fill="#3c365d" stroke="#bdadff" stroke-width="3"/>
<ellipse cx="186" cy="638" rx="57" ry="19" fill="#887ec2"/>
<path d="M129 638 V690 C129 716 243 716 243 690 V638" fill="#645997"/>
<ellipse cx="186" cy="690" rx="57" ry="19" fill="#645997"/>
<text x="421" y="654" text-anchor="middle" fill="#fff" font-family="Arial, sans-serif" font-size="29" font-weight="700">test DB</text>
<text x="421" y="695" text-anchor="middle" fill="#eeeaff" font-family="Arial, sans-serif" font-size="22">отдельная схема</text>
<rect x="62" y="778" width="596" height="72" rx="16" fill="#10243a" stroke="#456e95" stroke-width="2"/>
<text x="92" y="823" fill="#d8efff" font-family="Arial, sans-serif" font-size="23">config → INSERT → SELECT → rollback</text>
</svg>