Poceo sam da ucim kako se prave php unit testovi. Koristicu NetBeans pri ovom. Kada otvorim netbeans-ov primjer calculator.php i odaberem Tools->Create Test prijavi mi da ne moze naci skelgen fajl (prethodno sam podesio i PHPUnit i PHPUnit_SkeletonGenerator)
"/usr/bin/php" "/usr/local/bin/phpunit-skelgen" "--test" "--" "Calculator" "/home/boby/NetBeansProjects/Calculator-PHPUnit/src/Calculator.php" "CalculatorTest" "/home/boby/NetBeansProjects/Calculator-PHPUnit/test/CalculatorTest.php"
PHP Warning: require(phar://phpunit-skelgen-1.2.0.phar/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php): failed to open stream: phar error: invalid url or non-existent phar "phar://phpunit-skelgen-1.2.0.phar/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php" in /usr/local/bin/phpunit-skelgen on line 115
PHP Fatal error: require(): Failed opening required 'phar://phpunit-skelgen-1.2.0.phar/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/local/bin/phpunit-skelgen on line 115
Done.
Nasao sam tu 115 liniju ali ne kontam sta treba da uradim. U fajlu phpunit-skelgen pise ovako:
114 if (isset($classes[$class])) {
115 require 'phar://phpunit-skelgen-1.2.0.phar' . $classes[$class];
116 }
117 }
118 );
119
120 $textui = new SebastianBergmann\PHPUnit\SkeletonGenerator\Command;
121 $textui->main();
Novo mi je ovo sve i naravno da sam prethodno pretrazio google. Tako da molim bez onoga “nasao sam ovo na google-u za 10 sekundi”. Trazio sam ali ja ne mogu naci.
Hvala.