diff --git a/.gitignore b/.gitignore index 96bcd18..957c926 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ !*/ !/.gitignore !/composer.json +!/src/** +!/tests/** diff --git a/composer.json b/composer.json index 484a161..06dfd74 100644 --- a/composer.json +++ b/composer.json @@ -9,5 +9,18 @@ } ], "minimum-stability": "stable", - "require": {} + "require": {}, + "autoload": { + "psr-4": { + "Opdavies\\Glassboxx\\": "src/Glassboxx/" + } + }, + "autoload-dev": { + "psr-4": { + "Opdavies\\Glassboxx\\Tests\\": "tests/" + } + }, + "require-dev": { + "phpunit/phpunit": "^9.1" + } } diff --git a/src/Glassboxx/Config.php b/src/Glassboxx/Config.php new file mode 100644 index 0000000..68f297c --- /dev/null +++ b/src/Glassboxx/Config.php @@ -0,0 +1,40 @@ +password = $password; + $this->username = $username; + $this->vendorId = $vendorId; + } + + public function getPassword(): string + { + return $this->password; + } + + public function getUsername(): string + { + return $this->username; + } + + public function getVendorId(): int + { + return $this->vendorId; + } +} diff --git a/tests/Glassboxx/ConfigTest.php b/tests/Glassboxx/ConfigTest.php new file mode 100644 index 0000000..2fea320 --- /dev/null +++ b/tests/Glassboxx/ConfigTest.php @@ -0,0 +1,22 @@ +assertSame(12345, $config->getVendorId()); + $this->assertSame('opdavies', $config->getUsername()); + $this->assertSame('secret', $config->getPassword()); + } +}