Questions tagged as 'phpunit'

1
answer

Is there any way to test a route using the PHP unit in Laravel?

I really like to use PHPunit to create unit tests for my libraries. Always, before doing git commit , I run it to see if any changes affected what was previously working. I'd also like to be able to test route by route in L...
asked by 20.04.2016 / 22:15
1
answer

How to configure Netbeans to work with PHPUnit in a virtualized environment?

I use Netbeans 7.4 on Mac to program. And to not have to install PHP and PHPUnit, I would like to run PHPUnit installed on a virtual machine that has an entire integration environment already configured. This practice has been heavily used, and...
asked by 31.01.2014 / 03:18
1
answer

PHPUnit and Selenium - How to call specific functions of the test script?

I need to create multiple test scripts for WEB using PHPUnit and Selenium . I was successful with my initial tests. I was even able to test the login and logout of my web page effectively. The problem is that I can only execute all the f...
asked by 14.04.2014 / 15:14
1
answer

PHPUnit is not recognized by CakePHP

Now with the discontinuation of PHPUnit support by Pear , I started to face a major problem in making CakePHP recognize PHPUnit ... PHPUnit is already installed on my computer (Linux Mint), I can use it for the console without problems but a...
asked by 02.03.2015 / 19:33
2
answers

Error "class DomDocument not found" when trying to run PHPUnit

When I try to run the command phpunit from the command line, I received the following error:    Class 'DOMDocument' not found This was not happening before. I remember having to remove and reinstall PHP. What can cause this erro...
asked by 23.02.2017 / 16:42
1
answer

Coverage of Unit Tests in Laravel

When starting a repository with a new Laravel 5.5 installation and configuring the test coverage and Coveralls for this, even though you have only done scaffolding of the framework authentication and have not written a single line of code, the r...
asked by 14.02.2018 / 17:31
1
answer

Error "Fatal error: Class 'PHPUnit_Framework_TestCase' not found"

Good night, I just installed phpunit by a .phar file and adding the path in windows but when I run the tests it returns me the following error: Fatal error: Class 'PHPUnit_Framework_TestCase' not found in C:\wamp64\www\QuebraLinha\test\CasoTes...
asked by 02.09.2017 / 05:53
1
answer

PhpUnit works with Structured Programming?

Good morning, I have a college job that you should do unit tests, and for this I am using PHPUnit, the small application that I created to perform these tests is composed only by structured programming (without object orientation) but throughout...
asked by 23.10.2018 / 15:17
1
answer

How to perform mock in a class?

I created this script for testing purposes, and I have a Calculadora class that receives as an instance an instance of class Operacao , when I perform the unit test passing the class the test occurs successfully. But when I repla...
asked by 15.06.2017 / 01:29
0
answers

Doubt with PHPUnit Test-unit

I'm starting with PHPUnit, I'm implementing the first tests in my applications, but I have the following doubt. Should all classes really be tested, or are there any exceptions, if so what are they? For example. I have an MVC framework tha...
asked by 29.06.2017 / 20:14