Jarosław Czub

Ogólnie o programowaniu

Tag: codeception

Yii2, ErrorException i skopane logowanie

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383 Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Domyślnie w Yii2 skopanie jest logowanie błędów ErrorException, itd, nie zapisują się do loga, tylko lecą do >/dev/null … rozwiązanie jest trochę na okrętkę, ale działa: try{ /* Error code */ } catch (yii\base\ErrorException $ex){ Yii::error("ErrorException: file: ".$ex->getFile()." line: ".$ex->getLine()."\nPrevious Track: ".$ex->getPrevious()."\n\nStack: ".$ex->getTraceAsString()); throw new yii\base\ErrorException($ex); }try{ /* Error code */ } catch (yii\base\ErrorException $ex){ […]

Yii2 i testy w Codeception

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Fajnie jak wszystko pracuje bez błędów, gorzej jak nie chce … Tutaj walczyłem z unit testami oraz testami systemowymi w Yii2 i … nie chce działać. Wysypuje się aż miło, a wypisuje tylko „Internal Server Error”, w końcu się udało. Ponieważ stosuję inny układ katalogów w projekcie niż domyślny w Yii2, to Codeception nie potrafił […]

PHP Testing Framework Codeception pod Windowsem

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383 Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383 Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383 Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383 Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383 Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /usr/home/shadbb/domains/czub.info/public_html/wp-content/plugins/wp-syntax/wp-syntax.php on line 383

Tak na szybko, instalacja w krokach … Codeception jest to jeden z frameworków do testowania skryptów PHP typu BDD (Behavior Driven Development), można w nim również wykonywać testy jednostkowe (posiada wbudowanego PHPUnit’a), czy podążać ścieżką TDD. Ręczna instalacja i używanie pod Windowsom w paru krokach (plik php.exe jest na ścieżce przeszukiwań plików exe): Wchodzimy na […]

© 2023 Jarosław Czub — Powered by WordPress