{"id":330836,"date":"2022-03-19T15:00:13","date_gmt":"2022-03-19T15:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=330836"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=330836","title":{"rendered":"<span>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f PHP-\u0442\u0435\u0441\u0442\u043e\u0432 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/954\/645\/7ea\/9546457ea1817b277179079e02ef1ec8.jpg\" width=\"1523\" height=\"869\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/954\/645\/7ea\/9546457ea1817b277179079e02ef1ec8.jpg\" data-blurred=\"true\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u0441 \u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0418 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430. <\/p>\n<p>\u0422\u0430\u043a, \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 API \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0434\u043e\u0432\u0435\u043b\u043e\u0441\u044c \u0441\u0432\u0435\u0440\u044f\u0442\u044c \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0440\u0430\u043d\u043e\u0432. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u0442\u0438\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u043b\u043e \u0431\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u043d\u0430\u0434\u043e \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 php-\u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430. \u041f\u043e\u0437\u0436\u0435 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u044b\u043b \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d \u0432 php-\u043f\u0430\u043a\u0435\u0442<a href=\"https:\/\/github.com\/yuraplohov\/test-data-provider\" rel=\"noopener noreferrer nofollow\"> test-data-provider<\/a>.<\/p>\n<p>\u041f\u0430\u043a\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 <strong>&#8216;Yuraplohov\\TestDataProvider\\Provider&#8217;<\/strong> \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p><strong>Provider::getPHPUnitCases(array $caseDirs): array<\/strong> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 PHPUnit.<\/p>\n<\/li>\n<li>\n<p><strong>Provider::getCodeceptionCases(array $caseDirs): array<\/strong> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Codeception.<\/p>\n<\/li>\n<li>\n<p><strong>Provider::get(string $path): mixed<\/strong> &#8212; \u043c\u0435\u0442\u043e\u0434, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441 \u043b\u044e\u0431\u044b\u043c php-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 php-\u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0435 \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8216;data&#8217; \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u0442\u0435\u0441\u0442\u0430. \u0412 &#8216;data&#8217; \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <strong>getPHPUnitCases()<\/strong> \u0438 <strong>getCodeceptionCases()<\/strong> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>tests<\/p>\n<ul>\n<li>\n<p>Example_Test<\/p>\n<ul>\n<li>\n<p>ExampleTest.php<\/p>\n<\/li>\n<li>\n<p>data<\/p>\n<ul>\n<li>\n<p>case_1<\/p>\n<ul>\n<li>\n<p>input.json<\/p>\n<\/li>\n<li>\n<p>expected.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>case_2<\/p>\n<ul>\n<li>\n<p>input.json<\/p>\n<\/li>\n<li>\n<p>expected.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 <strong>&#8216;ExampleTest.php&#8217;<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>&#8216;data&#8217;<\/strong>. \u0412 <strong>&#8216;data&#8217;<\/strong> \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 (case_1, case_2). \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0441 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>&#8216;data&#8217;<\/strong> \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0424\u0430\u0439\u043b\u043e\u043c \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c php-\u0444\u0430\u0439\u043b, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre><code class=\"php\">&lt;?php  return [ \/\/ \u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 ];<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u0441\u0435 \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043b\u044e\u0431\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>json<\/strong>, <strong>xml<\/strong>, <strong>txt<\/strong>). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b <strong>getPHPUnitCases()<\/strong> \u0438 <strong>getCodeceptionCases()<\/strong> \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438. \u0412 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 [&#8216;case_1&#8217;, &#8216;case_2&#8217;].<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <strong>getPHPUnitCases()<\/strong>:<\/p>\n<pre><code class=\"php\">&lt;?php  \/**  * @test  * @dataProvider someProvider  *\/ public function it_gets_some_result(array $case) {     $sut = new SomeClass;      $this->assertEquals($case['expected'], $sut->someMethod($case['input'])); }  \/**  * @return array  *\/ public function someProvider(): array {     return (new Provider)->getPHPUnitCases([         'case_1',         'case_2',     ]); }<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <strong>getCodeceptionCases()<\/strong>:<\/p>\n<pre><code class=\"php\">&lt;?php  \/**  * @param UnitTester $I  * @param \\Codeception\\Example $example  * @dataProvider someProvider  *\/ public function it_gets_some_result(UnitTester $I, \\Codeception\\Example $example) {     $sut = new SomeClass;      $I->assertEquals($example['expected'], $sut->someMethod($example['input'])); }  \/**  * @return array  *\/ protected function someProvider() {     return (new Provider)->getCodeceptionCases([         'case_1',         'case_2',     ]); }<\/code><\/pre>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <strong>get()<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u044b\u043c PHP-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 (PHPUnit, Codeception, Pest).<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0438\u043b\u0438 \u043f\u0443\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 php-\u0444\u0430\u0439\u043b\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438 \u0444\u0430\u0439\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0448\u0435\u043c (&#171;\/&#187;), \u0430 \u0443\u0440\u043e\u0432\u043d\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 (&#171;.&#187;).<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>tests<\/p>\n<ul>\n<li>\n<p>Example_Test<\/p>\n<ul>\n<li>\n<p>ExampleTest.php<\/p>\n<\/li>\n<li>\n<p>data<\/p>\n<ul>\n<li>\n<p>service<\/p>\n<ul>\n<li>\n<p>input.json<\/p>\n<\/li>\n<li>\n<p>settings.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>expected.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>&#8216;data&#8217;<\/strong> \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <strong>get()<\/strong> \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b:<\/p>\n<p><code>get('service');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8216;data\/service&#8217;<\/p>\n<p><code>get('expected');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 &#8216;data\/expected.php&#8217;<\/p>\n<p><code>get('service\/input');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 &#8216;data\/service\/input.json&#8217;<\/p>\n<p><code>get('service\/settings');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 &#8216;data\/service\/settings.php&#8217;<\/p>\n<p><code>get('service\/settings.foo.bar');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 &#8216;bar&#8217; \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u043c &#8216;settings.php&#8217;. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c &#8216;foo.bar&#8217; &#8212; \u044d\u0442\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <strong>get()<\/strong>:<\/p>\n<pre><code class=\"php\">&lt;?php  \/** @test *\/ public function it_gets_some_result() {     $dp = new Provider;      $sut = new SomeClass($dp->get('service\/settings'));      $this->assertEquals($dp->get('expected'), $sut->someMethod($dp->get('service\/input'))); }<\/code><\/pre>\n<p>\u0421 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0438\u0437 \u0442\u0435\u0441\u0442\u0430 <strong>ExampleTest.php<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>Example_Test<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043a\u043b\u0430\u0434\u0443\u0442\u0441\u044f \u0441\u0430\u043c \u0444\u0430\u0439\u043b \u0442\u0435\u0441\u0442\u0430 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>data<\/strong>. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <strong>Example_Test<\/strong> \u043f\u043e\u043c\u0438\u043c\u043e <strong>ExampleTest.php<\/strong> \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u0435\u0439\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043a\u0435\u0439\u0441\u0430\u043c\u0438, \u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 (&#8217;01_some_interesting_case&#8217;, &#8217;02_another_case&#8217; &#8230;).<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>&#8216;case.txt&#8217;<\/strong>) \u0441 \u043a\u0440\u0430\u0442\u043a\u0438\u043c \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0435\u0439\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <strong>&#8216;message&#8217;<\/strong> \u0432 assert-\u043c\u0435\u0442\u043e\u0434\u0430\u0445.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/656475\/\"> https:\/\/habr.com\/ru\/post\/656475\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439, \u0441 \u0438\u0445 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438. \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0430 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u0434\u0438\u0446\u0438\u043e\u043d\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430. \u0417\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c, \u0430 \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c. \u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430. \u0418 \u0432\u0441\u0435 \u044d\u0442\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430. <\/p>\n<p>\u0422\u0430\u043a, \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 API \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0434\u043e\u0432\u0435\u043b\u043e\u0441\u044c \u0441\u0432\u0435\u0440\u044f\u0442\u044c \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u043c\u043d\u043e\u0433\u043e\u043c\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044d\u043a\u0440\u0430\u043d\u043e\u0432. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u0442\u0438\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0432 \u043a\u043e\u0434\u0435 \u0442\u0435\u0441\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u043b\u043e \u0431\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0438 \u0447\u0442\u0435\u043d\u0438\u0435 \u0442\u0435\u0441\u0442\u043e\u0432 \u043a\u0440\u0430\u0439\u043d\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u044b\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u043e\u0434\u0430 \u0442\u0435\u0441\u0442\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0445 \u043d\u0430\u0434\u043e \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e \u043e\u0442 \u0441\u0430\u043c\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 php-\u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0437 \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0438 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043a\u043e\u0434 \u0442\u0435\u0441\u0442\u0430. \u041f\u043e\u0437\u0436\u0435 \u044d\u0442\u043e\u0442 \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u044b\u043b \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d \u0432 php-\u043f\u0430\u043a\u0435\u0442<a href=\"https:\/\/github.com\/yuraplohov\/test-data-provider\" rel=\"noopener noreferrer nofollow\"> test-data-provider<\/a>.<\/p>\n<p>\u041f\u0430\u043a\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u043a\u043b\u0430\u0441\u0441 <strong>&#8216;Yuraplohov\\TestDataProvider\\Provider&#8217;<\/strong> \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438:<\/p>\n<ol>\n<li>\n<p><strong>Provider::getPHPUnitCases(array $caseDirs): array<\/strong> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 PHPUnit.<\/p>\n<\/li>\n<li>\n<p><strong>Provider::getCodeceptionCases(array $caseDirs): array<\/strong> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Codeception.<\/p>\n<\/li>\n<li>\n<p><strong>Provider::get(string $path): mixed<\/strong> &#8212; \u043c\u0435\u0442\u043e\u0434, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0441 \u043b\u044e\u0431\u044b\u043c php-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432. \u0418\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430. \u0422\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438\u0437 php-\u0444\u0430\u0439\u043b\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0435 \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u044e\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8216;data&#8217; \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u0442\u0435\u0441\u0442\u0430. \u0412 &#8216;data&#8217; \u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0444\u0430\u0439\u043b\u044b \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u0432 <strong>getPHPUnitCases()<\/strong> \u0438 <strong>getCodeceptionCases()<\/strong> \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0430\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\n<p>tests<\/p>\n<ul>\n<li>\n<p>Example_Test<\/p>\n<ul>\n<li>\n<p>ExampleTest.php<\/p>\n<\/li>\n<li>\n<p>data<\/p>\n<ul>\n<li>\n<p>case_1<\/p>\n<ul>\n<li>\n<p>input.json<\/p>\n<\/li>\n<li>\n<p>expected.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>case_2<\/p>\n<ul>\n<li>\n<p>input.json<\/p>\n<\/li>\n<li>\n<p>expected.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 <strong>&#8216;ExampleTest.php&#8217;<\/strong> \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>&#8216;data&#8217;<\/strong>. \u0412 <strong>&#8216;data&#8217;<\/strong> \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 (case_1, case_2). \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0441 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435, \u043d\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>&#8216;data&#8217;<\/strong> \u0432\u0441\u0435\u0433\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0442\u0430\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435.<\/p>\n<p>\u0424\u0430\u0439\u043b\u043e\u043c \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c php-\u0444\u0430\u0439\u043b, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432:<\/p>\n<pre><code class=\"php\">&lt;?php  return [ \/\/ \u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 ];<\/code><\/pre>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u0441\u0435 \u0442\u0440\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043b\u044e\u0431\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>json<\/strong>, <strong>xml<\/strong>, <strong>txt<\/strong>). \u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0430\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0439.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434\u044b <strong>getPHPUnitCases()<\/strong> \u0438 <strong>getCodeceptionCases()<\/strong> \u043d\u0430 \u0432\u0445\u043e\u0434 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439 \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438. \u0412 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u044d\u0442\u043e \u043c\u0430\u0441\u0441\u0438\u0432 [&#8216;case_1&#8217;, &#8216;case_2&#8217;].<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <strong>getPHPUnitCases()<\/strong>:<\/p>\n<pre><code class=\"php\">&lt;?php  \/**  * @test  * @dataProvider someProvider  *\/ public function it_gets_some_result(array $case) {     $sut = new SomeClass;      $this->assertEquals($case['expected'], $sut->someMethod($case['input'])); }  \/**  * @return array  *\/ public function someProvider(): array {     return (new Provider)->getPHPUnitCases([         'case_1',         'case_2',     ]); }<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <strong>getCodeceptionCases()<\/strong>:<\/p>\n<pre><code class=\"php\">&lt;?php  \/**  * @param UnitTester $I  * @param \\Codeception\\Example $example  * @dataProvider someProvider  *\/ public function it_gets_some_result(UnitTester $I, \\Codeception\\Example $example) {     $sut = new SomeClass;      $I->assertEquals($example['expected'], $sut->someMethod($example['input'])); }  \/**  * @return array  *\/ protected function someProvider() {     return (new Provider)->getCodeceptionCases([         'case_1',         'case_2',     ]); }<\/code><\/pre>\n<p>\u0422\u0440\u0435\u0442\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 <strong>get()<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u044b\u043c PHP-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u043c \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 (PHPUnit, Codeception, Pest).<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0443\u0442\u044c \u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043f\u0443\u0442\u044c \u043a \u0444\u0430\u0439\u043b\u0443 \u0438\u043b\u0438 \u043f\u0443\u0442\u044c \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0432 php-\u0444\u0430\u0439\u043b\u0435. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0438 \u0444\u0430\u0439\u043b \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0448\u0435\u043c (&#171;\/&#187;), \u0430 \u0443\u0440\u043e\u0432\u043d\u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 (&#171;.&#187;).<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0442\u0435\u0441\u0442\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>tests<\/p>\n<ul>\n<li>\n<p>Example_Test<\/p>\n<ul>\n<li>\n<p>ExampleTest.php<\/p>\n<\/li>\n<li>\n<p>data<\/p>\n<ul>\n<li>\n<p>service<\/p>\n<ul>\n<li>\n<p>input.json<\/p>\n<\/li>\n<li>\n<p>settings.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>expected.php<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>&#8216;data&#8217;<\/strong> \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0441 \u0444\u0430\u0439\u043b\u043e\u043c \u0442\u0435\u0441\u0442\u0430.<\/p>\n<p>\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430 <strong>get()<\/strong> \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b:<\/p>\n<p><code>get('service');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 &#8216;data\/service&#8217;<\/p>\n<p><code>get('expected');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 &#8216;data\/expected.php&#8217;<\/p>\n<p><code>get('service\/input');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 &#8216;data\/service\/input.json&#8217;<\/p>\n<p><code>get('service\/settings');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u0430 &#8216;data\/service\/settings.php&#8217;<\/p>\n<p><code>get('service\/settings.foo.bar');<\/code> &#8212; \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 &#8216;bar&#8217; \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u043e\u043c &#8216;settings.php&#8217;. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c &#8216;foo.bar&#8217; &#8212; \u044d\u0442\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0430.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u043e\u0434\u0430 <strong>get()<\/strong>:<\/p>\n<pre><code class=\"php\">&lt;?php  \/** @test *\/ public function it_gets_some_result() {     $dp = new Provider;      $sut = new SomeClass($dp->get('service\/settings'));      $this->assertEquals($dp->get('expected'), $sut->someMethod($dp->get('service\/input'))); }<\/code><\/pre>\n<p>\u0421 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0438\u0437 \u0442\u0435\u0441\u0442\u0430 <strong>ExampleTest.php<\/strong> \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>Example_Test<\/strong>, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043a\u043b\u0430\u0434\u0443\u0442\u0441\u044f \u0441\u0430\u043c \u0444\u0430\u0439\u043b \u0442\u0435\u0441\u0442\u0430 \u0438 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f <strong>data<\/strong>. \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f, \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 <strong>Example_Test<\/strong> \u043f\u043e\u043c\u0438\u043c\u043e <strong>ExampleTest.php<\/strong> \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.<\/p>\n<p>\u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u043c \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u043a\u0435\u0439\u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435, \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u0435\u0439\u0441\u0430. \u0427\u0442\u043e\u0431\u044b \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u043a\u0435\u0439\u0441\u0430\u043c\u0438, \u0438\u043c \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441 \u043d\u043e\u043c\u0435\u0440\u043e\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 (&#8217;01_some_interesting_case&#8217;, &#8217;02_another_case&#8217; &#8230;).<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0436\u0434\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043a\u0435\u0439\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <strong>&#8216;case.txt&#8217;<\/strong>) \u0441 \u043a\u0440\u0430\u0442\u043a\u0438\u043c \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043a\u0435\u0439\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <strong>&#8216;message&#8217;<\/strong> \u0432 assert-\u043c\u0435\u0442\u043e\u0434\u0430\u0445.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/656475\/\"> https:\/\/habr.com\/ru\/post\/656475\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-330836","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330836","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=330836"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/330836\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=330836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=330836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=330836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}