https://github.com/fredvuni/php-unit-testing
PHP unit testing for a todo list app
https://github.com/fredvuni/php-unit-testing
mysql php82 phpunit-tests
Last synced: 2 months ago
JSON representation
PHP unit testing for a todo list app
- Host: GitHub
- URL: https://github.com/fredvuni/php-unit-testing
- Owner: FREDVUNI
- Created: 2023-05-02T04:28:17.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-02T04:47:31.000Z (over 2 years ago)
- Last Synced: 2025-01-19T21:47:58.673Z (11 months ago)
- Topics: mysql, php82, phpunit-tests
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Task Manager Test - PHP UNIT testing with phpunit
This is a simple task manager application built using PHP and MySQL.
## Setup
1. Clone the repository to your local machine.
2. Create a new database in MySQL and import the `todo_tasks_test.sql` file to create the required tables.
3. Edit the `database.php` file to provide the correct database credentials.
4. Run `composer install` to install the required dependencies.
## Usage
To run the application, start a local server and run the various test suites.
## Testing
To run the PHPUnit tests, run the following command from the root of the project:
```
vendor/bin/phpunit
```
This will run all the tests in the `tests/` directory. You can run specific test files:
```
vendor/bin/phpunit CreateTasksTest
```
This will only run the `CreateTasksTest` class.
```
vendor/bin/phpunit DeleteTasksTest
```
This will only run the `DeleteTasksTest` class.
```
vendor/bin/phpunit FetchTasksTest
```
This will only run the `FetchTasksTest` class.
```
vendor/bin/phpunit UpdateTasksTest
```
This will only run the `UpadateTasksTest` class.