{"id":52086,"date":"2016-06-15T15:25:17","date_gmt":"2016-06-15T15:25:17","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=52086"},"modified":"2016-06-15T15:30:08","modified_gmt":"2016-06-15T15:30:08","slug":"integrate-phpunit-opencart","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/","title":{"rendered":"Integrate PHPUnit with Opencart"},"content":{"rendered":"<p>Here, we will learn how to implement the PHPUnit testing framework with Opencart. As Opencart already provides some\u00a0examples of tests\u00a0case so I\u00a0will provide a procedure to learn, how to write test cases.<\/p>\n<p>For that, we have to first install the Opencart and then in the root of Opencart, we\u00a0have to\u00a0create a folder. Here, I have created a folder named &#8220;tests&#8221;. In the folder, we have to download the composer installer using this command:<\/p>\n<p><code class=\"powershell plain\">curl<\/code> <code class=\"powershell color1\">-s<\/code> <code class=\"powershell plain\">http:\/\/getcomposer.org\/installer | php<\/code><\/p>\n<p>Then we need to create a file named composer.json in the folder itself and write the following in the composer.json file.<\/p>\n<pre class=\"brush:php\">{\r\n    \"require\": {\r\n        \"beyondit\/opencart-test-suite\": \"0.2.1\"\r\n    }\r\n}<\/pre>\n<p>&#8220;beyondit&#8221;\u00a0provides the Opencart test suite for PHPUnit testing. Here is the GitHub\u00a0<a href=\"https:\/\/github.com\/beyondit\/opencart-test-suite\">link<\/a>.<\/p>\n<p>After writing the above lines in the composer.json file, we have to install the dependencies using the command:<\/p>\n<pre class=\"brush:vb\">php composer.phar install<\/pre>\n<p>After running the above command, we will have a folder named vendor in the &#8216;tests&#8217; folder. We\u00a0will have a class OpenCartTest in file OpenCartTest.php which extends the PHPUnit framework. The OpenCartTest class will be\u00a0extended\u00a0by each test class we will write. The constructor of OpenCartTest class needed to be changed according to the Opencart version you are using. It is basically created for OC version 2.0.x.x. It actually contains the stuff we have in index.php. This class also contains the method for loading model and controller. We can create new methods as well.<\/p>\n<p>So, here\u00a0I have created a file named &#8220;firsttest&#8221; in the tests folder. In this file, we have &#8220;Firsttest&#8221; class which will extend the OpenCartTest class. As per PHPUnit, the file name must have &#8220;test&#8221; as postfix and each\u00a0function must have the &#8220;test&#8221; word as the prefix. So, here I put this simple code:<\/p>\n<pre class=\"brush:php\">&lt;?php \r\nclass Firsttest extends OpenCartTest { \r\n    public function testOne() {\r\n    \t$this-&gt;assertEquals('1', '2');\r\n    }   \r\n    public function testTwo() {\r\n    \t$this-&gt;assertEquals('1', '2');\r\n    }   \r\n    public function testThree() {\r\n    \t$this-&gt;assertEquals('2', '2');\r\n    }   \r\n    public function testFour() {\r\n    \t$this-&gt;assertEquals('1', '2');\r\n    }\r\n}\r\n?&gt;<\/pre>\n<p>On running the following command, we will have an output like in below image:<\/p>\n<pre class=\"brush:shell\">vendor\/bin\/phpunit firsttest<\/pre>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-52097\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/firstphpunittest.png\" alt=\"firstphpunittest\" width=\"771\" height=\"487\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/firstphpunittest.png 771w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/firstphpunittest-250x158.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/firstphpunittest-300x189.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/firstphpunittest-768x485.png 768w\" sizes=\"(max-width: 771px) 100vw, 771px\" loading=\"lazy\" \/><\/p>\n<p>This is showing 3 failures as only testThree is correct.testThree is correct.testThree is correct.testThree is correct.testThree is correct.testThree is correct.<\/p>\n<p>Here, in this another example, we are accessing the model in the front end. Here&#8217;s the test, I wrote in file customertest.php:<\/p>\n<pre class=\"brush:php\">&lt;?php\r\n\r\nclass ModelCatalogCustomerTest extends OpenCartTest {\r\n    public function testCheckCustomerName() {\r\n\r\n        \/\/ load the customer model\r\n        $model = $this-&gt;loadModelByRoute(\"account\/customer\");\r\n        $customer = $model-&gt;getCustomer(1);\r\n\r\n        \/\/ test a specific assertion\r\n        $this-&gt;assertEquals('Vikhyat', $customer['firstname']);\r\n        $this-&gt;assertTrue($customer['status']);\r\n    }\r\n}\r\n?&gt;<\/pre>\n<p>Here, there are two assertions in this file. On running the following command, we will have the given output.<\/p>\n<pre class=\"brush:shell\">vendor\/bin\/phpunit customertest<\/pre>\n<p><img decoding=\"async\" class=\"alignleft size-full wp-image-52103\" src=\"http:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/customertest.png\" alt=\"customertest\" width=\"745\" height=\"308\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/customertest.png 745w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/customertest-250x103.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/06\/customertest-300x124.png 300w\" sizes=\"(max-width: 745px) 100vw, 745px\" loading=\"lazy\" \/><br \/>\nHere, in this test, there is one failure, as the status was 1 which was not equal to true.<\/p>\n<p>Similarly, we can make tests over the controllers as well using the loadControllerByRoute and dispatchAction functions. Hope,\u00a0this will help you writing your test cases. You will find a list of assertions <a href=\"https:\/\/phpunit.de\/manual\/current\/en\/appendixes.assertions.html\">here<\/a> on PHPUnit website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here, we will learn how to implement the PHPUnit testing framework with Opencart. As Opencart already provides some\u00a0examples of tests\u00a0case so I\u00a0will provide a procedure to learn, how to write test cases. For that, we have to first install the Opencart and then in the root of Opencart, we\u00a0have to\u00a0create a folder. Here, I have <a href=\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":70,"featured_media":41008,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[305,13,3137],"tags":[2071,1978,3250],"class_list":["post-52086","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-opencart","category-php","category-testing","tag-opencart","tag-phpunit","tag-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Integrate PHPUnit with Opencart - 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\/integrate-phpunit-opencart\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integrate PHPUnit with Opencart - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"Here, we will learn how to implement the PHPUnit testing framework with Opencart. As Opencart already provides some\u00a0examples of tests\u00a0case so I\u00a0will provide a procedure to learn, how to write test cases. For that, we have to first install the Opencart and then in the root of Opencart, we\u00a0have to\u00a0create a folder. Here, I have [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\" \/>\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-06-15T15:25:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-06-15T15:30:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\"},\"author\":{\"name\":\"Vikhyat Sharma\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0\"},\"headline\":\"Integrate PHPUnit with Opencart\",\"datePublished\":\"2016-06-15T15:25:17+00:00\",\"dateModified\":\"2016-06-15T15:30:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\"},\"wordCount\":425,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"keywords\":[\"opencart\",\"PHPUnit\",\"testing\"],\"articleSection\":[\"opencart\",\"php\",\"Testing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\",\"url\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\",\"name\":\"Integrate PHPUnit with Opencart - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"datePublished\":\"2016-06-15T15:25:17+00:00\",\"dateModified\":\"2016-06-15T15:30:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrate PHPUnit with Opencart\"}]},{\"@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":"Integrate PHPUnit with Opencart - 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\/integrate-phpunit-opencart\/","og_locale":"en_US","og_type":"article","og_title":"Integrate PHPUnit with Opencart - Webkul Blog","og_description":"Here, we will learn how to implement the PHPUnit testing framework with Opencart. As Opencart already provides some\u00a0examples of tests\u00a0case so I\u00a0will provide a procedure to learn, how to write test cases. For that, we have to first install the Opencart and then in the root of Opencart, we\u00a0have to\u00a0create a folder. Here, I have [...]","og_url":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2016-06-15T15:25:17+00:00","article_modified_time":"2016-06-15T15:30:08+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/"},"author":{"name":"Vikhyat Sharma","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/af7160d2546c64a1856ab1b5ce77d9b0"},"headline":"Integrate PHPUnit with Opencart","datePublished":"2016-06-15T15:25:17+00:00","dateModified":"2016-06-15T15:30:08+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/"},"wordCount":425,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","keywords":["opencart","PHPUnit","testing"],"articleSection":["opencart","php","Testing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/","url":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/","name":"Integrate PHPUnit with Opencart - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","datePublished":"2016-06-15T15:25:17+00:00","dateModified":"2016-06-15T15:30:08+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/02\/Opencart-Code-Snippet.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/integrate-phpunit-opencart\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Integrate PHPUnit with Opencart"}]},{"@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\/52086","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=52086"}],"version-history":[{"count":3,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/52086\/revisions"}],"predecessor-version":[{"id":52110,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/52086\/revisions\/52110"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/41008"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=52086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=52086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=52086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}