Module unittest Kohana error, how to use? - unit-testing

I am trying times longer run it has several errors. Someone
has any tutorial or some way to make it work. Tested
several tutorials and I could not.
vlw staff
I already placed the php unittest unit in the directory.
the error is as follows:
Fatal error: main() [function.require]: Failed opening required
'PHPUnit/Util/Filter.php' (include_path='.;C:\php5\pear') in C:\wamp
\www\doeseulixo\branches\module_unittest\modules\unittest\PHPUnit
\Framework.php on line 0

See Installing PHPUnit.

PHPUnit should be installed with the 'pear' utility rather than downloaded manually. Kohana needs access to more than one class of the library.

Related

Angular build error in core/src/render3/interfaces

While building an Angular 6 app i get a compile error in #angular/core/src/render3/interfaces on line 35. The line is:
[ACTIVE_INDEX]: number | null;
and the error is:
error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
I an using #angular/core#6.1.6. Am I doing something wrong or is this an Angular bug?
Verify that Visual Studio is targeting the correct version of Typescript (as seen in your package.json), then try deleting your node_modules folder, and rerunning npm install.
I believe that this is caused by running Angular 6 with an earlier, incompatible version of typescript (<2.7), because it looks like the ability used by the container.d.ts file (referenced in your error) to use Constant-Named Properties was added in Typescript 2.7. Of course, if it were that simple then ng serve would tell you about the Typescript incompatibility, so I assume that I'm either wrong, or that your environment is playing tricks on you.
See here for a related question.

phpunit tests returning no assertions and all errors

I am new to unit testing (and would really like to learn). I tried pulling down this repository (https://github.com/serbanghita/Mobile-Detect) and have been trying to run their unit tests they already have set up. I have it to the point where phpunit is running but when I run
phpunit tests
from the root directory I get:
Tests: 1411, Assertions: 0, Errors: 1411
I have tried running
phpunit --configuration tests/phpunit.xml
but then I get the error:
Class "JohnKary\PHPUnit\Listener\SpeedTrapListener" does not exist
They have something in their documentation about running:
php phpunit.phar -c tests/phpunit.xml
but I get the error
Could not open input file: phpunit.phar
which is because of the way I have phpunit set up I'm sure...
Any suggestions on how to further trouble shoot this?
It appears you have configured https://github.com/johnkary/phpunit-speedtrap to be used as a test listener in your phpunit.xml but have not (properly) installed this extension.
And if your PHP cannot find phpunit.phar then you are either not pointing it to the correct path or you have not downloaded / installed the PHPUnit PHAR, maybe because you chose to install PHPUnit via Composer. In that case the correct path would be vendor/bin/phpunit, of course.

Sulu not running on PHP7

was any one of you able to install sulu on a webserver running Apache and PHP7?
When I try to clear the cache, I get an error PHP Fatal error: Cannot use 'String' as class name as it is reserved in /var/www/foobar/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/String.php on line 28
We are already working on that. The main problem is the usage of a class named String in the PHPCR-ODM. They fixed that in version 1.3. Also there are some tests still failing, but we are already working on that. You can follow the progress on the corresponding PR.

Dajaxice not being parsed by template renderer?

Well i recently put my site into production and this is the last of a few bugs i need to fix. Basically dajaxice/dajaxice.core.js in returning this error in console Uncaught SyntaxError: Unexpected token %. I have placed that particular folder into static and run collect static. The file is fetched however upon opening up the file from the error the django code embedded within the file is not being rendered.
I have placed the file wihtin the head of my base file. Does anyone have any suggestions as to why this is occuring. In my local envionment (development) it is working flawlessly. The only difference i had when installing the two is that i used pip to install it on production and on local i directly downloaded the file and installed it from github. How do i find the version of Dajaxice that is installed?
Does anyone have any ideas as to why this is occuring?
Thanks

PHPUnit stoping with no feedback when trying to dispatch in Zend Framework controllers

[EDIT] My test enviroment is as seen in http://www.slideshare.net/DragonBe/unit-testing-after-zf-18 and using the source from https://github.com/DragonBe/zfunittest.
When I try to run a simples dispatch("/"), I´m getting the following as answer:
C:\wamp\www\MyProject\tests>phpunit
PHPUnit 3.7.19 by Sebastian Bergmann.
Configuration read from C:\wamp\www\MyProject\tests\phpunit.xml
.
C:\wamp\www\MyProject\tests>
Does anyone have a clue about what is happening?
The phpunit just stops and gives me no feedback.
I´m running Wampserver 2.2 over Windows 7x 64, ZF 1.11, PHP 5.4.3 and PHPunit 3.7.
Thank you all in advance.
In order to solve this problem, I tried to rewrite my files.
Removing ob_start() from the begining of my TestHelper.php, gave me the erros (thank God!), one after another, as I solved each of them (and phpunit was no more stoping execution):
Session must be started before any output has been sent to the
browser
No default module defined for this application
Fatal error: Call to a member function hasResource() on a non-object
in ...ErrorController.php
After some search in other posts, I tried the following, in the setUp method of my IndexControllerTest.php:
public function setUp(){
$this->bootstrap('session');
$front = Zend_Controller_Front::getInstance();
$front->setParam('noErrorHandler', true);
$this->getFrontController()->setControllerDirectory(APPLICATION_PATH . '/controllers');
parent::setUp();
}
Then, now this is working fine.
Thanks for all those who helped me.