Note: This project runs in 8.1 and does not work yet with 8.2
- Clone the repository
- Configure settings in
.config
folder:- create and modify the
db-local.php
file to point to your database (I recommend using XAMPP or something similar for your database)- You can add the following code and modify it as needed
<?php return [ 'charset' => 'utf8', 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1;dbname=workorder', 'username' => 'root', 'password' => '', 'charset' => 'utf8', ];
- You can add the following code and modify it as needed
- create and modify the
- Install composer (https://getcomposer.org/)
- Open a terminal inside the project folder and run
$ composer install
If that returns an error try$ composer update
- To get all the tables that you need in your database, run the following command inside of the project folder:
- Production:
$ php7 yii migrate/up 2
(This will initialize the database and rbac) - Development/Testing:
$ php7 yii migrate/fresh
(This will initialize the database, rbac, and seeds with testing users).
- Production:
- After logging in as admin (username: admin password: admin), go to Admin Tools.
- Edit the admin user and change the password.
- To run the project, run the command
php7 yii serve
inside of the project folder
The following is an example of how to link the project in your apache server
<IfModule alias_module>
#
# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
Alias "/tune" "/srv/http/tuneup"
# ...
</IfModule>
<Directory "/srv/http/tuneup">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
Don't forget to turn on rewrite engine module in apache and to give the right permissions to the project folder so that Apache can access it.
In order to run both unit tests and acceptance tests created for this project, one must follow the following steps
- Install Chromedriver
- Setup the project as provided above
- Run the following command
php7 vendor/bin/codecept run unit
inside of the project folder
- Run the following command
chromedriver --url-base=/wd/hub --port=4444
and keep the process running - Serve the project using the development command.
- Run the following command to start the tests:
php7 vendor/bin/codecept run acceptance
inside the project folder