Tag Archives: unit test

Is there a way to have multiple phpt tests in one file?

Is there a way to have multiple phpt tests in one file?
I found instructions and examples to have many lines of output, but that’s not the same:
http://qa.php.net/sample_tests/sample001.phpContinua a leggere

Tagged , , | Lascia un commento

PHP – Come faccio a generare stringhe con caratteri di controllo o di dati binari?

For testing purposes I need strings such as:

"testx00string"

I would like to loop over the control characters (00-1F) and generate the strings automatically so I don’t have to clutter my code with 31 lines like this but don’t know Continua a leggere

Tagged , , | 1 Come

Netbeans “no tests executed

I have a php project with unit tests included. I use Netbeans for development and would like to have phpunit intergration in my IDE. If I run phpunit from the commandline, it is working. If I press Alt+F6 to runContinua a leggere

Tagged , , , | 1 Come

Unit test con il framework CodeIgniter

I am trying to unit test the functions within a website developed. Its my first time so I am having great troubles. I have tried understanding this testing but how do I implement it? I have read and understood itContinua a leggere

Tagged , , , | Lascia un commento

Semplice test vs PHPUnit

I was wondering if anyone that have experience in both these stuff can shed some light on the significant difference between the two, se del caso?
Any specific strength of each that makes it suitable for any specific case? Continua a leggere

Tagged , , , | 2 Commenti

Perché serie mantenere i dati duplicati

While working with PHP ,handling connection’s with Database (MySQL)

$result = mysql_query('select * from products');
$row = mysql_fetch_array($result);

And yesterday founded out that array $row… had Duplicate data within.
First you have Data’s selected from database arranged in Indexes like Continua a leggere

Tagged , , , | 2 Commenti

What does PHPUnit Strict mode do?

I am wondering about whatstrict mode is in PHPUnit” ?
ad esempio,:

phpunit --strict

or in phpunit.xml

<phpunit strict="true">

I turned it on just to try it and my tests started failing with

PHP_Invoker_TimeoutException: Execution aborted after 1 second

Continua a leggere

Tagged , , | 1 Come

How do I run multiple versions of PHPUnit on the same machine?

I’m using Zend Framework for some projects and want to build up PHPUnit test suites for them. Sfortunatamente, Zend Framework in it’s current version (1.11.x) only supports PHPUnit 3.5. Contemporaneamente, I would also like to start workingContinua a leggere

Tagged , , | 1 Come

zf- PHPUnit – best way to mock / test $this->getRequest()->getParam('controller')

PHPUnit – Zend Framework
what’s the best way to mock / how to test this code
$questo,>getRequest()->getParam(‘controller’)
in a controller action helper?
(or any param or that matter as it’s all related)
I’m guessing I need to mock the requestContinua a leggere

Tagged , , , | Lascia un commento

Don't test groups( PHPUnit support @group annotation) functions of class extends from Yii in Netbeans

Current I’ve a problem with Yii, when I’d using@group annotation” ( support by PHPUnit ) to test a groups function in my class extends from Yii.
I’d configured as guidance in forum of Yii (NetBeans IDE and Yii projects). Continua a leggere

Tagged , , , , | Lascia un commento
9 pagine