{"id":44794,"date":"2016-04-02T08:40:54","date_gmt":"2016-04-02T08:40:54","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=44794"},"modified":"2016-04-02T08:40:54","modified_gmt":"2016-04-02T08:40:54","slug":"write-tests-using-phpunit","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/","title":{"rendered":"Write tests using PHPUnit"},"content":{"rendered":"<p>Here, we will learn how to write the tests using the PHPUnit. First of all, we have to download the composer installer in our\u00a0root\u00a0folder\u00a0using the command:<\/p>\n<pre class=\"brush:powershell\">curl -s http:\/\/getcomposer.org\/installer | php<\/pre>\n<p>Then, we have to create a composer.json file in the root and put the following lines into it:<\/p>\n<pre class=\"brush:js\">{\r\n    \"require\": {\r\n        \"phpunit\/phpunit\": \"4.0.*\"\r\n    }\r\n}<\/pre>\n<p>Here, I used version 4.0.* instead of 5.0.* because version 5 requires PHP version 5.6 but I could only afford\u00a0version 5.5.9.<\/p>\n<p>After pasting the above lines, we have to install the dependencies using the command:<\/p>\n<pre class=\"brush:shell\">php composer.phar install<\/pre>\n<p>It will create a vendor folder by default in which the PHPUnit\u00a0packages will be stored.<\/p>\n<p>Now, create a folder in which all the code files will be placed and a folder named Test need to be created parallel to those files in which all the files containing tests will be placed.<\/p>\n<p>The file name and the class name of the tests should be same. The class name must end with &#8216;Test&#8217; and function name must start with &#8216;test&#8217;. So, the class name will look like &#8216;class_nameTest&#8217; and function name will look like &#8216;testfunction_name&#8217;.<\/p>\n<p>So, here I have created a file name OneTest.php in the Test folder and the code placed in this file is as follows:<\/p>\n<pre class=\"brush:php\">&lt;?php\r\n\r\nnamespace phpUnitTutorial\\Test;\r\n\r\nclass OneTest extends \\PHPUnit_Framework_TestCase\r\n{\r\n public function testTrue()\r\n {\r\n $foo = true;\r\n $this-&gt;assertTrue($foo);\r\n }\r\n \/**\r\n * @test\r\n *\/\r\n public function failure()\r\n {\r\n $foo1 = array(1, 2, 3, 4, 5, 6);\r\n $foo2 = array('1', 2, 33, 4, 5, 6); \/\/ taken from the php unit docs\r\n\r\n $this-&gt;assertEquals($foo1,$foo2);\r\n }\r\n}<\/pre>\n<p>You can also write @test in php docs so that it will recognize it as test function even if it don&#8217;t have the prefix &#8216;test&#8217; like I did in second function.<\/p>\n<p>After writing tests, you have to create a XML file named phpunit.xml in the root folder which represents the path of the test files. Here, I have created a file named phpunit.xml as:<\/p>\n<pre class=\"brush:php\">&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;phpunit colors=\"true\"&gt;\r\n &lt;testsuites&gt;\r\n &lt;testsuite name=\"Application Test Suite\"&gt;\r\n &lt;directory&gt;.\/phpUnitTutorial\/Test\/&lt;\/directory&gt;\r\n &lt;\/testsuite&gt;\r\n &lt;\/testsuites&gt;\r\n&lt;\/phpunit&gt;<\/pre>\n<p>Now after doing so, you have to run test in the\u00a0Terminal as:<\/p>\n<pre class=\"brush:xml\">vendor\/bin\/phpunit\u00a0\r\n<\/pre>\n<p>Here are a few outputs of tests performed:<\/p>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-44797\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitnotestfound.png\" alt=\"phpunitnotestfound\" width=\"728\" height=\"325\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitnotestfound.png 728w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitnotestfound-250x112.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitnotestfound-300x134.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitnotestfound-604x270.png 604w\" sizes=\"(max-width: 728px) 100vw, 728px\" loading=\"lazy\" \/><\/p>\n<p>When no test class was found<\/p>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-44798\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitsuccess.png\" alt=\"phpunitsuccess\" width=\"728\" height=\"202\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitsuccess.png 728w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitsuccess-250x69.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitsuccess-300x83.png 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" loading=\"lazy\" \/><\/p>\n<p>While making tests\u00a0over the first function in the test\u00a0file<\/p>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-44799\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitfailure.png\" alt=\"phpunitfailure\" width=\"728\" height=\"595\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitfailure.png 728w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitfailure-250x204.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/phpunitfailure-300x245.png 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" loading=\"lazy\" \/><\/p>\n<p>While\u00a0making tests over both the functions in the test file<\/p>\n<p>For a thorough knowledge of the PHPUnit, please do visit\u00a0<a href=\"https:\/\/phpunit.de\/manual\/current\/en\/installation.html\">PHPUnit Documentation<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here, we will learn how to write the tests using the PHPUnit. First of all, we have to download the composer installer in our\u00a0root\u00a0folder\u00a0using the command: curl -s http:\/\/getcomposer.org\/installer | php Then, we have to create a composer.json file in the root and put the following lines into it: { &#8220;require&#8221;: { &#8220;phpunit\/phpunit&#8221;: &#8220;4.0.*&#8221; } <a href=\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":70,"featured_media":43102,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[2057,1978,2922,2921],"class_list":["post-44794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-php","tag-phpunit","tag-test-case","tag-tests"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Write tests using PHPUnit - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Write tests using PHPUnit - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Here, we will learn how to write the tests using the PHPUnit. First of all, we have to download the composer installer in our\u00a0root\u00a0folder\u00a0using the command: curl -s http:\/\/getcomposer.org\/installer | php Then, we have to create a composer.json file in the root and put the following lines into it: { &quot;require&quot;: { &quot;phpunit\/phpunit&quot;: &quot;4.0.*&quot; } [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-04-02T08:40:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vikhyat Sharma\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vikhyat Sharma\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\"},\"author\":{\"name\":\"Vikhyat Sharma\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0\"},\"headline\":\"Write tests using PHPUnit\",\"datePublished\":\"2016-04-02T08:40:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\"},\"wordCount\":330,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png\",\"keywords\":[\"PHP\",\"PHPUnit\",\"test case\",\"tests\"],\"articleSection\":[\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\",\"url\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\",\"name\":\"Write tests using PHPUnit - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png\",\"datePublished\":\"2016-04-02T08:40:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Write tests using PHPUnit\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0\",\"name\":\"Vikhyat Sharma\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vikhyat Sharma\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/vikhyat-sharma83\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Write tests using PHPUnit - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/","og_locale":"en_US","og_type":"article","og_title":"Write tests using PHPUnit - Webkul Blog","og_description":"Here, we will learn how to write the tests using the PHPUnit. First of all, we have to download the composer installer in our\u00a0root\u00a0folder\u00a0using the command: curl -s http:\/\/getcomposer.org\/installer | php Then, we have to create a composer.json file in the root and put the following lines into it: { \"require\": { \"phpunit\/phpunit\": \"4.0.*\" } [...]","og_url":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2016-04-02T08:40:54+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png","type":"image\/png"}],"author":"Vikhyat Sharma","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vikhyat Sharma","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/"},"author":{"name":"Vikhyat Sharma","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0"},"headline":"Write tests using PHPUnit","datePublished":"2016-04-02T08:40:54+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/"},"wordCount":330,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png","keywords":["PHP","PHPUnit","test case","tests"],"articleSection":["php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/","url":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/","name":"Write tests using PHPUnit - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png","datePublished":"2016-04-02T08:40:54+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/03\/Code-Snippet.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/write-tests-using-phpunit\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Write tests using PHPUnit"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0","name":"Vikhyat Sharma","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7c9c700cc2d7120c9faf1ab3392b4e533808ba197f58c0441d6caecc68179e12?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vikhyat Sharma"},"url":"https:\/\/webkul.com\/blog\/author\/vikhyat-sharma83\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/44794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/70"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=44794"}],"version-history":[{"count":1,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/44794\/revisions"}],"predecessor-version":[{"id":44802,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/44794\/revisions\/44802"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/43102"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=44794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=44794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=44794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}