-
Notifications
You must be signed in to change notification settings - Fork 0
Checkpoint 2 - Potato ORM #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
elchroy
wants to merge
57
commits into
master
Choose a base branch
from
develop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The BaseModel class is responsible to handling basic database CRUD operations. Two methods are included - getAll() and connect(). A new test class is the BaseModelTest class to handle tests for the BaseModel class. Also included some coverage, and testing configurations with composer and phunit.
The query to get all records from database was initially commented out and needed to be deleted.
A new random test is added to test and trigger coverage with coveralls.
An unneccessary string in the circle.yml file caused circleci test integration to fail. This bug (string) is removed.
Some new features are added including - getAll() to get all records from a database table - find() to get one record by ID from the table - insert() to insert new records to the table - update() to update existing recrds from the table - save() to integrate with update() or insert() Some other files were deletd or renamed.
A new test for the geOne() function to fetch one record from a database is added.
The PDO classes are global and should be used when there is a namespace for the test class. Otherwise there is no need to include the use statement.
The new tests are added for the functions and methods of the Potato Query class This is to improve test coverage and integration.
The static connection variable is being called in the static query class It should not be called from an object since it is a static property of the class.
The Mockery type-hinting for integers is not compatible with PHP 7 which is the version on the local machine. This is removed and be compatitble with PHP 5.5+ precisely PHP 5.6
The classes are modified to include dependencies. The tests for classes are then carried out with mocked versions of classes.
The composer.json file is update with a virtual file mocking tool use to mock the file system as it is a dependent of the PotatoConnector class. Also some new tests are added using the vfsStream, vfsStreamWrapper and vfsStreamDirectory.
The PotatoConnector class is modified to enable tests with the PotatoConnectorTest class.
New exception classes are added which include - FaultyOrNoTableException, when the database table does not exist. - FaultyConnectionException, when the connection is not established correctly. - FaultyExecutionException, when the execution of a query does not get succesddful perhaps due to wrong column mathces.
New tests are added to the model test class to improve test coverage and integration.
The tests that require a database to be setup on the server are disabled temporarily.
Remove all the tests thta depend on a server database. This is only temporarily though.
The default dependencies are removed because of some compatibility issues with Mockery and older versions of PHP (PHP 5.6)
The dependencies for the classes are modified to enable testing to be done.
An SQLite database file is created to enhance test coverage. Other database operations are done on database file.
The sqlite database that is created is modified to enable tests of dependent class methods.
Some new tests are added for the exceptions classes including - FaultyExecutionException - FaultyOrNoTableException - FaultyConnectionException
The test for the table name which refers to class is question is deactivated temporarily. This is because of external database dependecies.
A new package that was initially installed had conflicts with coverage integration. This new package is uninstalled.
Some new tests are added to improve test coverage and intergration with coverage.
The method that retrieves the configuration file is tested.
A new exception class is added. Tests for the class are also added.
The classes are well documented to ensure easy comprehension and understanding of the functionalities of all classes of the project.
An SQLite database in created to enable tests that depend on a database. This is not permanent though.
A new package is installed to enable tests that needed to be performed online.
The class functions and methods that deal with database connections are edited and refactored to enable both mysql and sqlite to be used properly.
The package supports two database engines and have different connections for both. The instructions for both are added to the README.md. This ensures easy usage of the package.
The README.md is modified to explain the connection with MySQL. The description of username and root are better defined to illustrate that the user should input his correct database configuration details.
Some lines of code create database files that are not relevant to the package. Those lines of code are removed and the database files that were created are deleted.
|
Changes Unknown when pulling 72851dd on develop into * on master*. |
The README.md is modified to enable better understanding and comprehension of the usage of the package.
|
Changes Unknown when pulling 0cc7801 on develop into * on master*. |
The README.md is modified with details of the how to delete a record from the database with the package.
|
Changes Unknown when pulling ec14f5f on develop into * on master*. |
| [](https://scrutinizer-ci.com/g/andela-celisha-wigwe/PotatoORM/?branch=develop) | ||
|
|
||
| # PotatoORM | ||
| A simple php database object relational mapping package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: "PHP"
Git / Commit Messages
README
Comments
Directory Structure
Code Quality
Functionality
Testing
|
|
Changes Unknown when pulling 1ec43df on develop into * on master*. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.