Quick links: Content - sections - sub sections
EN FR
Quick Search Advanced search
 
Page

  [Opened] jelix 1.3 => PHPUnit

Bon,

Ce qui me plait dans Jelix c'est d'avoir juste à copier des fichiers php pour que ça fonctionne. Et là je découvre que les tests unitaires à partir de la 1.3 se feront avec PHPUnit ! D'après leur doc, il faut utiliser pear pour installer ça, et pear, sur windows, c'est assez complexe à utiliser.

Y a moyen de faire plus simple ? C'est pas juste des fichiers php PHPUnit ? Ce qui m'embête c'est que j'ai voulu utiliser jelix surtout pour cette partie installation sans RoR et autre python etc... Ca m'embêterait de devoir utiliser autre chose qu'un simple copier-coller...

Alors, ça ne touche que la partie dev, c'est sûr que c'est moins grave, mais bon. Si quelqu'un sait utiliser pear sous windows, je suis preneur...


Mindiell

  [Opened] jelix 1.3 => PHPUnit

PEAR en 2sec smile

 

http://pear.php.net/manual/en/installation.getting.php

on recupe le phar http://pear.php.net/go-pear.phar

et php go-pear.php

ca donne :

C:\wamp\bin\php\php5.3.4\PEAR>php go-pear.phar

Are you installing a system-wide PEAR or a local copy?
(system|local) [[system]] :
Please confirm local copy by typing 'yes' : yes

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type 'all' to change all of them or simply press Enter to
accept these locations.

<code>
 1. Installation base ($prefix)                   : C:\wamp\bin\php\php5.3.4\PEAR
 2. Temporary directory for processing            : C:\wamp\bin\php\php5.3.4\PEAR\tmp
 3. Temporary directory for downloads             : C:\wamp\bin\php\php5.3.4\PEAR\tmp
 4. Binaries directory                            : C:\wamp\bin\php\php5.3.4\PEAR
 5. PHP code directory ($php_dir)                 : C:\wamp\bin\php\php5.3.4\PEAR\pear
 6. Documentation directory                       : C:\wamp\bin\php\php5.3.4\PEAR\docs
 7. Data directory                                : C:\wamp\bin\php\php5.3.4\PEAR\data
 8. User-modifiable configuration files directory : C:\wamp\bin\php\php5.3.4\PEAR\cfg
 9. Public Web Files directory                    : C:\wamp\bin\php\php5.3.4\PEAR\www

10. Tests directory : C:\wamp\bin\php\php5.3.4\PEAR\tests 11. Name of configuration file : C:\wamp\bin\php\php5.3.4\PEAR\pear.ini 12. Path to CLI php.exe : C:\wamp\bin\php\php5.3.4

1-12, 'all' or Enter to continue:

Beginning install... Configuration written to C:\wamp\bin\php\php5.3.4\PEAR\pear.ini... Initialized registry... Preparing to install... installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.7.tar... installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.0.tar... installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.2.tar... installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.4.tar... installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar... install ok: channel://pear.php.net/Archive_Tar-1.3.7 install ok: channel://pear.php.net/Console_Getopt-1.3.0 install ok: channel://pear.php.net/Structures_Graph-1.0.4 install ok: channel://pear.php.net/XML_Util-1.2.1 install ok: channel://pear.php.net/PEAR-1.9.2 PEAR: Optional feature webinstaller available (PEAR's web-based installer) PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer) PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer) PEAR: To install optional features use "pear install pear/PEAR#featurename"

WARNING! The include_path defined in the currently used php.ini does not contain the PEAR PHP directory you just specified:

<C:\wamp\bin\php\php5.3.4\PEAR\pear>

If the specified directory is also not in the include_path used by your scripts, you will have problems getting any PEAR packages working.

Would you like to alter php.ini <C:\wamp\bin\php\php5.3.4\php.ini>? Y/n : y

php.ini <C:\wamp\bin\php\php5.3.4\php.ini> include_path updated.

Current include path : .;C:\php\pear Configured directory : C:\wamp\bin\php\php5.3.4\PEAR\pear Currently used php.ini (guess) : C:\wamp\bin\php\php5.3.4\php.ini

  • WARNING! Old version found at C:\wamp\bin\php\php5.3.4\PEAR, please remove it or be sure to use the new c:\wamp\bin\php\php5.3.4\pear\pea

r.bat command

The 'pear' command is now at your service at c:\wamp\bin\php\php5.3.4\pear\pear.bat

  • The 'pear' command is not currently in your PATH, so you need to
  • use 'c:\wamp\bin\php\php5.3.4\pear\pear.bat' until you have added
  • 'C:\wamp\bin\php\php5.3.4\PEAR' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list' to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

  http://pear.php.net/faq.php
  http://pear.php.net/manual/

Thanks for using go-pear!

</code>

on acheve le tout par

C:\wamp\bin\php\php5.3.4\PEAR>pear install phpunit
WARNING: "pear/PHPUnit" is deprecated in favor of "channel://pear.phpunit.de/PHPUnit"
Did not download dependencies: pear/PHP_Compat, use --alldeps or --onlyreqdeps to download automatically
pear/PHPUnit can optionally use package "pear/PHP_Compat"
downloading PHPUnit-1.3.2.tgz ...
Starting to download PHPUnit-1.3.2.tgz (20,913 bytes)
........done: 20,913 bytes
install ok: channel://pear.php.net/PHPUnit-1.3.2

Follow me on twitter - HaveFnuBB! - Fork on GitHub : HaveFnuBB // Jelix // Huanui

  [Opened] jelix 1.3 => PHPUnit

Merci, j'essaye ça de suite...

Hum, il supporte pas tellement le répertoire "Program Files" dans lequel j'ai installé easyphp.


Mindiell

  [Opened] jelix 1.3 => PHPUnit

WampServer est ton amismile


Follow me on twitter - HaveFnuBB! - Fork on GitHub : HaveFnuBB // Jelix // Huanui

  [Opened] jelix 1.3 => PHPUnit

Y a moyen de faire plus simple ? C'est pas juste des fichiers php PHPUnit ?

non, au contraire, ce serait plus compliqué d'intégrer tout ça dans Jelix, parce que PHPUnit a des dépendances avec d'autres paquets PEAR. J'ai pas envie de passer mon temps à checker ce qu'il faut inclure à chaque nouvelle version. Et puis ça représente quand même beaucoup, beaucoup de fichiers. J'ai bien peur que ça double la taille de l'archive de Jelix.

Et puis PEAR (et bien souvent PHPUnit) sont pré-installés ou disponible en une ligne de commande sur les plateformes de dev, donc je ne vois pas pourquoi on s’embêterait à le packager nous même. Si ce n'est pas dispo/installé, soit tu le fais à la main, soit tu changes de plateforme de dev (par plateforme, je ne parle pas forcément d'OS, <troll>quoique, développer sous windows...</troll>).

  [Opened] jelix 1.3 => PHPUnit

foxmask a dit :
WampServer est ton amismile

Mauvaise idée: changer de système de développement juste parce qu'un programme ne prends pas en compte les répertoires avec un espace, c'est la faute du programme, pas de mon environnement de dev ;oP.

laurentj a dit :
soit tu changes de plateforme de dev

Bah, j'ai les deux de dispo, mais là aussi, être obligé d'utiliser telle plateforme ou tel OS, voire tel programme pour développer, c'est pas bien. Mais bon, je vais faire mes tests PHPUnit sur linux pour le moment quand même smile


Mindiell

  [Opened] jelix 1.3 => PHPUnit

Mindiell a dit :

foxmask a dit :
WampServer est ton amismile


Mauvaise idée: changer de système de développement juste parce qu'un programme ne prends pas en compte les répertoires avec un espace, c'est la faute du programme, pas de mon environnement de dev ;oP.

laurentj a dit :
soit tu changes de plateforme de dev


Bah, j'ai les deux de dispo, mais là aussi, être obligé d'utiliser telle plateforme ou tel OS, voire tel programme pour développer, c'est pas bien.

"le beurre et l'argent du beurre " smile Tu peux aussi te contenter d'installer unitairement (c'est bien à propos smile Apache, MySQL et PHP plutot qu'avec un "truc" tout en un qui n'est pas adapté à une utilisation un poil plus poussé ...

Mais bon, je vais faire mes tests PHPUnit sur linux pour le moment quand même smile

@Laurentj : ralala ; l'avantage avec PHP c'est le multiplateforme tant pour le langage que pour les outils ; médisants smile

je code indifféremment sous mac/lin/win mais tjs avec KomodoEdit grin


Follow me on twitter - HaveFnuBB! - Fork on GitHub : HaveFnuBB // Jelix // Huanui

  [Opened] jelix 1.3 => PHPUnit

foxmask a dit :
PEAR en 2sec smile


http://pear.php.net/manual/en/installation.getting.php

on recupe le phar http://pear.php.net/go-pear.phar


et php go-pear.php

ca donne :
<code>
C:\wamp\bin\php\php5.3.4\PEAR>php go-pear.phar

Are you installing a system-wide PEAR or a local copy?
(system|local) system :
Please confirm local copy by typing 'yes' : yes

Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.

1. Installation base ($prefix) : C:\wamp\bin\php\php5.3.4\PEAR
2. Temporary directory for processing : C:\wamp\bin\php\php5.3.4\PEAR\tmp
3. Temporary directory for downloads : C:\wamp\bin\php\php5.3.4\PEAR\tmp
4. Binaries directory : C:\wamp\bin\php\php5.3.4\PEAR
5. PHP code directory ($php_dir) : C:\wamp\bin\php\php5.3.4\PEAR\pear
6. Documentation directory : C:\wamp\bin\php\php5.3.4\PEAR\docs
7. Data directory : C:\wamp\bin\php\php5.3.4\PEAR\data
8. User-modifiable configuration files directory : C:\wamp\bin\php\php5.3.4\PEAR\cfg
9. Public Web Files directory : C:\wamp\bin\php\php5.3.4\PEAR\www
10. Tests directory : C:\wamp\bin\php\php5.3.4\PEAR\tests
11. Name of configuration file : C:\wamp\bin\php\php5.3.4\PEAR\pear.ini
12. Path to CLI php.exe : C:\wamp\bin\php\php5.3.4

1-12, 'all' or Enter to continue:

Beginning install...
Configuration written to C:\wamp\bin\php\php5.3.4\PEAR\pear.ini...
Initialized registry...
Preparing to install...
installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Archive_Tar-1.3.7.tar...
installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Console_Getopt-1.3.0.tar...
installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/PEAR-1.9.2.tar...
installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/Structures_Graph-1.0.4.tar...
installing phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pear.phar/PEAR/go-pear-tarballs/XML_Util-1.2.1.tar...
install ok: channel://pear.php.net/Archive_Tar-1.3.7
install ok: channel://pear.php.net/Console_Getopt-1.3.0
install ok: channel://pear.php.net/Structures_Graph-1.0.4
install ok: channel://pear.php.net/XML_Util-1.2.1
install ok: channel://pear.php.net/PEAR-1.9.2
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"

******************************************************************************
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
<C:\wamp\bin\php\php5.3.4\PEAR\pear>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.


Would you like to alter php.ini <C:\wamp\bin\php\php5.3.4\php.ini>? Y/n : y

php.ini <C:\wamp\bin\php\php5.3.4\php.ini> include_path updated.

Current include path : .;C:\php\pear
Configured directory : C:\wamp\bin\php\php5.3.4\PEAR\pear
Currently used php.ini (guess) : C:\wamp\bin\php\php5.3.4\php.ini

** WARNING! Old version found at C:\wamp\bin\php\php5.3.4\PEAR, please remove it or be sure to use the new c:\wamp\bin\php\php5.3.4\pear\pea
r.bat command

The 'pear' command is now at your service at c:\wamp\bin\php\php5.3.4\pear\pear.bat

** The 'pear' command is not currently in your PATH, so you need to
** use 'c:\wamp\bin\php\php5.3.4\pear\pear.bat' until you have added
** 'C:\wamp\bin\php\php5.3.4\PEAR' to your PATH environment variable.

Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.

For more information about PEAR, see:

http://pear.php.net/faq.php
http://pear.php.net/manual/

Thanks for using go-pear!
</code>
on acheve le tout par
<code>
C:\wamp\bin\php\php5.3.4\PEAR>pear install phpunit
WARNING: "pear/PHPUnit" is deprecated in favor of "channel://pear.phpunit.de/PHPUnit"
Did not download dependencies: pear/PHP_Compat, use --alldeps or --onlyreqdeps to download automatically
pear/PHPUnit can optionally use package "pear/PHP_Compat"
downloading PHPUnit-1.3.2.tgz ...
Starting to download PHPUnit-1.3.2.tgz (20,913 bytes)
........done: 20,913 bytes
install ok: channel://pear.php.net/PHPUnit-1.3.2
</code>

Merci foxmask pour la petite procédure d'install smile j'ai essayé de la suivre mais malheureusement, je n'arrive pas à installer PEAR correctement sur mon poste. Comme tu l'as marqué, j'ai été récupérer le go-pear.php et le go-pear.phar. Je les ai placé dans mon répertoire PEAR de php (C:\wamp\bin\php\php5.3.4\PEAR). et j'ai lancé la commande 'php go-pear.phar' à partir de ce même répertoire. il me demande bien si c'est du local ou non, la suggestion des chemin et ensuite l'install commence. mais j'ai plein de message d'erreur (warning) concernant un mkdir qui se trouve dans le fichier System.php, du genre : "Warning: mkdir(): Invalid argument in phar://C:/wamp/bin/php/php5.3.4/PEAR/go-pe ar.phar/System.php on line 302"

Sais tu d'où cela peut venir ? ca fait deux jours que je galère dessus, et je trouve pas vraiment d'info sur le net... du moins, rien qui me débloque... pour infos, je suis sur Win 7, avec Wamp 2.1d (php 5.3.4, Mysql 5.1.53, Apache 2.2.17)

  [Opened] jelix 1.3 => PHPUnit

WAMP n'est pas fourni avec pear ??

  [Opened] jelix 1.3 => PHPUnit

laurentj a dit :
WAMP n'est pas fourni avec pear ??

Non, pas avec la version 2.1 de Wamp. Je crois que c'est a partir de la version 5.3 de Php, que pear ne fait plus parti du package...

 
Page
  1. [Résolu]chemin du "jelix-www" >
  2. myapp dans dbprofils.ini.php >
  3. my.default.conf.php.dist bien à jour ? >
  4. Erreur sql lors de la création d'une partie admin >
  5. myapp dans dbprofils.ini.php >
  6. Erreur sql lors de la création d'une partie admin >
  7. createdao exception >
  8. jelix 1.3 => PHPUnit