Mittwoch, 28. November 2012

Probleme mit PHPUnit

Bei mir lief das aktualisieren der PHPUnit nicht. Es kam immer die folgende Ausgabe:

PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 650

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 650
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 697

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 697
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 757

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 757
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 786

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 786
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 914

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 914
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 1577

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 1577
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 1607

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 1607
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 2038

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 2038
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Config.php on line 2091

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Config.php on line 2091
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Registry.php on line 322

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Registry.php on line 322
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Registry.php on line 1450

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Registry.php on line 1450
PHP Deprecated:  Assigning the return value of new by reference is deprecated in
 C:\xampp\php\PEAR\PEAR\Registry.php on line 1458

Deprecated: Assigning the return value of new by reference is deprecated in C:\x
ampp\php\PEAR\PEAR\Registry.php on line 1458
PHP Strict Standards:  Non-static method System::tmpdir() should not be called s
tatically in C:\xampp\php\PEAR\PEAR\Config.php on line 158

Strict Standards: Non-static method System::tmpdir() should not be called static
ally in C:\xampp\php\PEAR\PEAR\Config.php on line 158
PHP Strict Standards:  Non-static method System::tmpdir() should not be called s
tatically in C:\xampp\php\PEAR\PEAR\Config.php on line 167

Strict Standards: Non-static method System::tmpdir() should not be called static
ally in C:\xampp\php\PEAR\PEAR\Config.php on line 167
PHP Strict Standards:  Non-static method System::tmpdir() should not be called s
tatically in C:\xampp\php\PEAR\PEAR\Config.php on line 176

Strict Standards: Non-static method System::tmpdir() should not be called static
ally in C:\xampp\php\PEAR\PEAR\Config.php on line 176
PHP Strict Standards:  Non-static method System::which() should not be called st
atically in C:\xampp\php\PEAR\PEAR\Config.php on line 229

Strict Standards: Non-static method System::which() should not be called statica
lly in C:\xampp\php\PEAR\PEAR\Config.php on line 229
PHP Strict Standards:  Non-static method Console_Getopt::getopt() should not be
called statically, assuming $this from incompatible context in C:\xampp\php\PEAR
\PHPUnit2\TextUI\TestRunner.php on line 154

Strict Standards: Non-static method Console_Getopt::getopt() should not be calle
d statically, assuming $this from incompatible context in C:\xampp\php\PEAR\PHPU
nit2\TextUI\TestRunner.php on line 154
PHP Strict Standards:  Non-static method Console_Getopt::doGetopt() should not b
e called statically, assuming $this from incompatible context in C:\xampp\php\PE
AR\Console\Getopt.php on line 78

Strict Standards: Non-static method Console_Getopt::doGetopt() should not be cal
led statically, assuming $this from incompatible context in C:\xampp\php\PEAR\Co
nsole\Getopt.php on line 78
PHP Strict Standards:  Non-static method PEAR::isError() should not be called st
atically, assuming $this from incompatible context in C:\xampp\php\PEAR\Console\
Getopt.php on line 87

Strict Standards: Non-static method PEAR::isError() should not be called statica
lly, assuming $this from incompatible context in C:\xampp\php\PEAR\Console\Getop
t.php on line 87
PHP Strict Standards:  Non-static method PEAR::isError() should not be called st
atically, assuming $this from incompatible context in C:\xampp\php\PEAR\PHPUnit2
\TextUI\TestRunner.php on line 160

Strict Standards: Non-static method PEAR::isError() should not be called statica
lly, assuming $this from incompatible context in C:\xampp\php\PEAR\PHPUnit2\Text
UI\TestRunner.php on line 160
PHPUnit 2.3.6 by Sebastian Bergmann.

Usage: phpunit [switches] UnitTest [UnitTest.php]
  --testdox-html   Write agile documentation in HTML format to file.
  --testdox-text   Write agile documentation in Text format to file.
  --log-xml        Log test progress in XML format to file.

  --loader       TestSuiteLoader implementation to use.

  --skeleton             Generate skeleton UnitTest class for Unit in Unit.php.

  --wait                 Waits for a keystroke after each test.

  --help                 Prints this usage information.
  --version              Prints the version and exits.




Um drotzdem Testen zu können habe ich den folgenden Weg gefunden:

Die Datei phpunit.Phar Herunterladen. Dies geht einfach mit Firefox die folgende URL öffen:
http://pear.phpunit.de/get/phpunit.phar (Firefox fragt bei mir dann gleich ober die Datei Speichern soll)

Wenn man dann PHPUnit nutzen möchte ruft man die Datei wie folgt in der Komandozeile(Windows) auf:
php Laufwerk:\pfad_zum_file\phpunit.phar
(Man muß sich nur in dem Verzeichnis befinden, wo die phpunit.xml.dist und bootstrap.php liegen) Die benötigten Dateien vom Test sucht sich das Programm dann selbst zusammen.

Keine Kommentare:

Kommentar veröffentlichen