{"id":277,"date":"2013-04-16T17:34:49","date_gmt":"2013-04-16T15:34:49","guid":{"rendered":"http:\/\/www.lafabriquedecode.com\/blog\/?p=277"},"modified":"2013-04-16T17:34:49","modified_gmt":"2013-04-16T15:34:49","slug":"installer-phpunit-avec-composer","status":"publish","type":"post","link":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/","title":{"rendered":"Installer phpUnit avec Composer"},"content":{"rendered":"<p>T\u00e9l\u00e9chargez d&rsquo;abord Composer. Placez vous dans le r\u00e9pertoire de votre choix (v\u00e9rifiez naturellement que vous y avez les droits d&rsquo;\u00e9criture) et tapez :<\/p>\n<pre>curl -sS https:\/\/getcomposer.org\/installer | php<\/pre>\n<p>ensuite vous installez phpUnit \u00e0 proprement parler :<\/p>\n<pre><strong>php composer.phar require \"phpunit\/phpunit\"<\/strong>\r\nPlease provide a version constraint for the phpunit\/phpunit requirement: <strong>3.7.*    <\/strong> \r\ncomposer.json has been updated\r\nLoading composer repositories with package information\r\nUpdating dependencies (including require-dev)\r\n  - Installing symfony\/yaml (v2.2.1)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-text-template (1.1.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/phpunit-mock-objects (1.2.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-timer (1.0.4)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-token-stream (1.1.5)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-file-iterator (1.3.3)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/php-code-coverage (1.2.9)\r\n    Downloading: 100%         \r\n\r\n  - Installing phpunit\/phpunit (3.7.19)\r\n    Downloading: 100%         \r\n\r\nphpunit\/php-code-coverage suggests installing ext-xdebug (&gt;=2.0.5)\r\nphpunit\/phpunit suggests installing phpunit\/php-invoker (&gt;=1.1.0,&lt;1.2.0)<\/pre>\n<p>V\u00e9rifiez la bonne tenue de votre fichier composer.json :<\/p>\n<pre>cat composer.json \r\n{\r\n    \"require\": {\r\n        \"phpunit\/phpunit\": \"3.7.*\"\r\n    }\r\n}<\/pre>\n<p>Vous trouverez l&rsquo;ex\u00e9cutable phpunit dans le sous-r\u00e9pertoire \u00ab\u00a0vendor\/bin\u00a0\u00bb. Lancez le et vous verrez la traditionnelle liste des options s&rsquo;afficher \u00e0 l&rsquo;\u00e9cran !<\/p>\n<p>Bons tests unitaires !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>T\u00e9l\u00e9chargez d&rsquo;abord Composer. Placez vous dans le r\u00e9pertoire de votre choix (v\u00e9rifiez naturellement que vous y avez les droits d&rsquo;\u00e9criture) et tapez : curl -sS https:\/\/getcomposer.org\/installer | php ensuite vous installez phpUnit \u00e0 proprement parler : php composer.phar require \u00ab\u00a0phpunit\/phpunit\u00a0\u00bb Please provide a version constraint for the phpunit\/phpunit requirement: 3.7.* composer.json has been updated Loading [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[25],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.6.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installer phpUnit avec Composer - La Fabrique de code - Tech 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=\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installer phpUnit avec Composer - La Fabrique de code - Tech blog\" \/>\n<meta property=\"og:description\" content=\"T\u00e9l\u00e9chargez d&rsquo;abord Composer. Placez vous dans le r\u00e9pertoire de votre choix (v\u00e9rifiez naturellement que vous y avez les droits d&rsquo;\u00e9criture) et tapez : curl -sS https:\/\/getcomposer.org\/installer | php ensuite vous installez phpUnit \u00e0 proprement parler : php composer.phar require &quot;phpunit\/phpunit&quot; Please provide a version constraint for the phpunit\/phpunit requirement: 3.7.* composer.json has been updated Loading [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/\" \/>\n<meta property=\"og:site_name\" content=\"La Fabrique de code - Tech blog\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-16T15:34:49+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:creator\" content=\"@LaFabrique2Code\" \/>\n<meta name=\"twitter:site\" content=\"@LaFabrique2Code\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/\",\"url\":\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/\",\"name\":\"Installer phpUnit avec Composer - La Fabrique de code - Tech blog\",\"isPartOf\":{\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/#website\"},\"datePublished\":\"2013-04-16T15:34:49+00:00\",\"dateModified\":\"2013-04-16T15:34:49+00:00\",\"author\":{\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/#\/schema\/person\/83863c048b82fd9ccf6407bddd241162\"},\"breadcrumb\":{\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"http:\/\/www.lafabriquedecode.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installer phpUnit avec Composer\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/#website\",\"url\":\"http:\/\/www.lafabriquedecode.com\/blog\/\",\"name\":\"La Fabrique de code - Tech blog\",\"description\":\"PHP objet, MySQL, Design Patterns, OOP...et plus !\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.lafabriquedecode.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/#\/schema\/person\/83863c048b82fd9ccf6407bddd241162\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"http:\/\/www.lafabriquedecode.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/0.gravatar.com\/avatar\/fc2e1de7c8a1871b50ff9c6a6f8682a2?s=96&d=retro&r=g\",\"contentUrl\":\"http:\/\/0.gravatar.com\/avatar\/fc2e1de7c8a1871b50ff9c6a6f8682a2?s=96&d=retro&r=g\",\"caption\":\"admin\"},\"url\":\"http:\/\/www.lafabriquedecode.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installer phpUnit avec Composer - La Fabrique de code - Tech 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":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/","og_locale":"fr_FR","og_type":"article","og_title":"Installer phpUnit avec Composer - La Fabrique de code - Tech blog","og_description":"T\u00e9l\u00e9chargez d&rsquo;abord Composer. Placez vous dans le r\u00e9pertoire de votre choix (v\u00e9rifiez naturellement que vous y avez les droits d&rsquo;\u00e9criture) et tapez : curl -sS https:\/\/getcomposer.org\/installer | php ensuite vous installez phpUnit \u00e0 proprement parler : php composer.phar require \"phpunit\/phpunit\" Please provide a version constraint for the phpunit\/phpunit requirement: 3.7.* composer.json has been updated Loading [&hellip;]","og_url":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/","og_site_name":"La Fabrique de code - Tech blog","article_published_time":"2013-04-16T15:34:49+00:00","author":"admin","twitter_card":"summary","twitter_creator":"@LaFabrique2Code","twitter_site":"@LaFabrique2Code","twitter_misc":{"\u00c9crit par":"admin","Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/","url":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/","name":"Installer phpUnit avec Composer - La Fabrique de code - Tech blog","isPartOf":{"@id":"http:\/\/www.lafabriquedecode.com\/blog\/#website"},"datePublished":"2013-04-16T15:34:49+00:00","dateModified":"2013-04-16T15:34:49+00:00","author":{"@id":"http:\/\/www.lafabriquedecode.com\/blog\/#\/schema\/person\/83863c048b82fd9ccf6407bddd241162"},"breadcrumb":{"@id":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.lafabriquedecode.com\/blog\/2013\/04\/installer-phpunit-avec-composer\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"http:\/\/www.lafabriquedecode.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Installer phpUnit avec Composer"}]},{"@type":"WebSite","@id":"http:\/\/www.lafabriquedecode.com\/blog\/#website","url":"http:\/\/www.lafabriquedecode.com\/blog\/","name":"La Fabrique de code - Tech blog","description":"PHP objet, MySQL, Design Patterns, OOP...et plus !","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.lafabriquedecode.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"Person","@id":"http:\/\/www.lafabriquedecode.com\/blog\/#\/schema\/person\/83863c048b82fd9ccf6407bddd241162","name":"admin","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"http:\/\/www.lafabriquedecode.com\/blog\/#\/schema\/person\/image\/","url":"http:\/\/0.gravatar.com\/avatar\/fc2e1de7c8a1871b50ff9c6a6f8682a2?s=96&d=retro&r=g","contentUrl":"http:\/\/0.gravatar.com\/avatar\/fc2e1de7c8a1871b50ff9c6a6f8682a2?s=96&d=retro&r=g","caption":"admin"},"url":"http:\/\/www.lafabriquedecode.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/posts\/277"}],"collection":[{"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/comments?post=277"}],"version-history":[{"count":1,"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions"}],"predecessor-version":[{"id":278,"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/posts\/277\/revisions\/278"}],"wp:attachment":[{"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/media?parent=277"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/categories?post=277"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lafabriquedecode.com\/blog\/wp-json\/wp\/v2\/tags?post=277"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}