Getting Started with PHPUnit | Code Testing #3

preview_player
Показать описание


--You May Also Like --

==================FOLLOW ME ==================

Subscribe for New Releases!

(ask me questions!)

--- QUESTIONS? ---

Leave a comment below and I or someone else can help you.
For quick questions you may also want to ask me on Twitter, I respond almost immediately.

Thanks for all your support!
Рекомендации по теме
Комментарии
Автор

It's <testsuites> and <testsuite>, not <testsuits> and <testsuit>. "e" letter is missing.
Also for typing less alias can be created, i.e.:
alias phpunit="vendor/bin/phpunit"
so after that test can be run by just typing "phpunit"

golubovicm
Автор

If you are using windows, use \ instead of /. This is due to the location of the base directory

TheZboy
Автор

Wow very simply explained..
All other tuts in youtube on unit testing is shit.
Thank u

adilismail
Автор

I am still getting the list of options for php unit when i type vendor/bin/phpunit (same result as typing it before saving xml file)
here is the xml file after i saved it
<?xml version="1.0" encoding="UTF-8" ?>

<phpunit

<testsuits>

<testsuit name="unit">

<directory>tests</directory>

</testsuit>

</testsuits>

</phpunit>


please help

TheSpiritof
Автор

Thanks for the tutorial. I got an error 'testsuits' this element is not expected. configuration file did not pass validation.


<?xml version="1.0" encoding="UTF-8" ?>

<phpunit bootstrap ="vendor/autoload.php"

colors="true"
verbose="true"
stopOnFailure="true">

<testsuits>
<testsuit name="unit">
<directory>tests</directory>
</testsuit>
</testsuits>

</phpunit>

knowiz
Автор

Once again you're the best bro, thanks a lot, your work is really worthy.

geekhamster
Автор

Very nice overview and a good inspiration for a starting video. Thx so much!!

NeverCodeAlone
Автор

Thanks for this tutorial. I am facing one issue. I created the phpunit.xml file but still getting the configuration part. Please, can you help me to solve this.

akshaygoyal
Автор

Need help please phpunit not installing?

josiahtobas
Автор

itd not working for me ..i just get all the iptions

pjmclenon
Автор

With verbose turned on, phpunit says that testsuits is unexpected.

I replaced testsuits with testsuites based on the following discussion and phpunit worked.

I'm not sure why everything worked in this video. Maybe phpunit stopped accepting testsuits as the same as testsuites in a later version.

IARRCSim
Автор

we need the same tutorial in eclipse, some problem facing while running composer/PHPUnit

somayajisubs