PDO tests factory
- Dominant language
- PHP
- Stars
- 49
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
need to use Factory class for creating PDO objects.
instead of $this->db = new \PDO('mysql:dbname=moa', 'travis');
need write $this->db = PDOFactory::GetInstance();
and use something like this:
class PDOFactory{
static function GetInstance(){
return new \PDO('mysql:dbname=moa', 'travis');
}
}
And connection credentials will be saved on only one file instead of all tests .
Contributor guide
No contributing guide indexed for this repository
Research direction
No file or test path is named. Find the tests that instantiate PDO with the shown MySQL connection, centralize their credentials through a PDOFactory, and verify that the test suite still connects successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- database, testing
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100