Skip to content

Tests per a l'exercici de PHP+MySQL i la DB World

Notifications You must be signed in to change notification settings

AWS2/php-mysql-world-test-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Repo base amb tests per a l'exercici de PHP+MySQL

Aquest és un repo base amb els tests per a l'exerici 1 disponible a la site:

https://bytes.cat/php_mysql#exercici_1

Installation

You need to have installed:

References:

General procedure

Install dependencies:

$ sudo apt install php-curl php-mbstring php-xml php-zip

Install composer from here: https://getcomposer.org/download/

Clone repo and download packages:

$ composer install

Shell 1: web server

Start webapp in port 8000 in an independent shell:

$ cd src
$ php -S 0.0.0.0:8000

Shell 2: execute tests

Run all tests in .tests folder (done with phpunit):

$ vendor/bin/phpunit .tests

You could also run tests one by one:

$ vendor/bin/phpunit .tests/TitleTest.php

Troubleshooting

If the test errors do not appear, open your php.ini file (usually /etc/php/X.Y/cli/php.ini) and check the variable zend.assertions = 1.

About

Tests per a l'exercici de PHP+MySQL i la DB World

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published