diff --git a/Controller/API/BaseController.php b/Controller/API/BaseController.php index 40dc235..94314da 100644 --- a/Controller/API/BaseController.php +++ b/Controller/API/BaseController.php @@ -1,24 +1,25 @@ name = 'BaseController'; + } + + public static function create() { return new self(); } - static function create() { return new self(); } /** -* __call magic method. +* The __call() method is invoked automatically when a non-existing method or inaccessible method is called. */ public function __call($name, $arguments) { - $this->sendOutput('', array('HTTP/1.1 404 Not Found')); + $this->sendOutput('', array('HTTP/1.1 404 Non-Existant method or inaccessible method called')); } /** * Get URI elements. diff --git a/Tests/Controller/API/BaseControllerTest.php b/Tests/Controller/API/BaseControllerTest.php index fcce9c9..a7d8e46 100644 --- a/Tests/Controller/API/BaseControllerTest.php +++ b/Tests/Controller/API/BaseControllerTest.php @@ -1,36 +1,76 @@ - 'firefox'); - $this->webDriver = RemoteWebDriver::create('http://localhost:4444/wd/hub', $capabilities); + protected $base; + + #[\Override] + public function setUp(): void { + $this->base = new BaseController(); } - public function tearDown() { - $this->webDriver->close(); + #[\Override] + public function tearDown(): void { + $this->base = null; + } + + public function testConstruct(): void + { + $this->assertSame('BaseController', $this->base->name); + } + + public function testCreate(): void + { + $controllerObj = BaseController::create(); + $this->assertSame('BaseController', $controllerObj->name); + } + + #[Depends('testConstruct')] + public function testCall(): void + { + $this->base->mymethod = 'test'; + $this->assertSame('test', $this->base->mymethod); } - protected $url = 'http://www.netbeans.org/'; - - public function testSimple() { - $this->webDriver->get($this->url); - // checking that page title contains word 'NetBeans' - $this->assertContains('NetBeans', $this->webDriver->getTitle()); + public function testGetUriSegments(): void + { + // Stop here and mark this test as incomplete. + $this->markTestIncomplete( + 'This test has not been implemented yet.', + ); } + + public function testGetQueryStringParams(): void + { + // Stop here and mark this test as incomplete. + $this->markTestIncomplete( + 'This test has not been implemented yet.', + ); + } + + public function testGetServerRequestMethod(): void + { + // Stop here and mark this test as incomplete. + $this->markTestIncomplete( + 'This test has not been implemented yet.', + ); + } + + public function testSendOutput(): void + { + // Stop here and mark this test as incomplete. + $this->markTestIncomplete( + 'This test has not been implemented yet.', + ); + } + } diff --git a/Tests/Controller/API/CustomerControllerTest.php b/Tests/Controller/API/CustomerControllerTest.php index cbedf85..e10fefd 100644 --- a/Tests/Controller/API/CustomerControllerTest.php +++ b/Tests/Controller/API/CustomerControllerTest.php @@ -1,36 +1,109 @@ - 'firefox'); - $this->webDriver = RemoteWebDriver::create('http://localhost:4444/wd/hub', $capabilities); +class CustomerControllerTest extends TestCase { + + private readonly HttpClientInterface $httpClient; + protected $url = 'http://localhost/CustomerRewardsRESTAPI/index.php/customer/process/select'; + + #[\Override] + public function setUp(): void { + $this->httpClient= HttpClient::create(); } - public function tearDown() { - $this->webDriver->close(); + #[\Override] + public function tearDown(): void { + //nothing to do } - protected $url = 'http://www.netbeans.org/'; + /* + * [ + * { + * "customer_id": 0, + * "customer_name_first": "Not", + * "customer_name_last": "Member", + * "customer_email": "email@host.com", + * "customer_phone": "000-000-0000", + * "customer_birthday": "1900-01-01", + * "customer_street": "0 No Name Avenue", + * "address_city": "city", + * "address_state": "state", + * "address_zip": "00000", + * "loyalty_member": 0 + * } + * ] + */ + public function testIndexSelectById(): void { + $response = $this->httpClient->request('GET', $this->url, [ + 'query' => ['customer_id' => 0]]); + + $statusCode = $response->getStatusCode(); + $this->assertSame(200, $statusCode); + + $contentType = $response->getHeaders()['content-type'][0]; + $this->assertSame('application/json', $contentType); + + //$content = $response->getContent(); + //$this->assertSame('Not', $content['customer_name_first']); + + $content = $response->toArray(); + $this->assertSame(0, $content[0]['customer_id']); + $this->assertSame('Not', $content[0]['customer_name_first']); + $this->assertSame('Member', $content[0]['customer_name_last']); + $this->assertSame('email@host.com', $content[0]['customer_email']); + $this->assertSame('000-000-0000', $content[0]['customer_phone']); + $this->assertSame('1900-01-01', $content[0]['customer_birthday']); + $this->assertSame('0 No Name Avenue', $content[0]['customer_street']); + $this->assertSame('city', $content[0]['address_city']); + $this->assertSame('state', $content[0]['address_state']); + $this->assertSame('00000', $content[0]['address_zip']); + $this->assertSame(0, $content[0]['loyalty_member']); + } + + public function testIndexSelect(): void { + $response = $this->httpClient->request('GET', $this->url, [ + 'query' => ['limit' => 1]]); - public function testSimple() { - $this->webDriver->get($this->url); - // checking that page title contains word 'NetBeans' - $this->assertContains('NetBeans', $this->webDriver->getTitle()); + $statusCode = $response->getStatusCode(); + $this->assertSame(200, $statusCode); + + $contentType = $response->getHeaders()['content-type'][0]; + $this->assertSame('application/json', $contentType); + + $content = $response->toArray(); + + //Check if a single array is returned + $arrayCount = count($content); + $this->assertSame(1, $arrayCount); + + //Check if the array has 11 elements + $arrayElementCount = count($content[0]); + $this->assertSame(11, $arrayElementCount); + + //Verify the element names match expected + $this->assertArrayHasKey('customer_id', $content[0]); + $this->assertArrayHasKey('customer_name_first', $content[0]); + $this->assertArrayHasKey('customer_name_last', $content[0]); + $this->assertArrayHasKey('customer_email', $content[0]); + $this->assertArrayHasKey('customer_phone', $content[0]); + $this->assertArrayHasKey('customer_birthday', $content[0]); + $this->assertArrayHasKey('customer_street', $content[0]); + $this->assertArrayHasKey('address_city', $content[0]); + $this->assertArrayHasKey('address_state', $content[0]); + $this->assertArrayHasKey('address_zip', $content[0]); + $this->assertArrayHasKey('loyalty_member', $content[0]); } } diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php new file mode 100644 index 0000000..6c8c4f5 --- /dev/null +++ b/Tests/bootstrap.php @@ -0,0 +1,3 @@ +=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "reference": "0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/http-client", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client.git", + "reference": "6ce3c4c899051b3d7326ea1a1dda3729e29ae6d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client/zipball/6ce3c4c899051b3d7326ea1a1dda3729e29ae6d7", + "reference": "6ce3c4c899051b3d7326ea1a1dda3729e29ae6d7", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "psr/log": "^1|^2|^3", + "symfony/http-client-contracts": "^3.4.1", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "php-http/discovery": "<1.15", + "symfony/http-foundation": "<6.4" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/http-client-implementation": "1.0", + "symfony/http-client-implementation": "3.0" + }, + "require-dev": { + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", + "amphp/http-tunnel": "^1.0", + "amphp/socket": "^1.1", + "guzzlehttp/promises": "^1.4|^2.0", + "nyholm/psr7": "^1.0", + "php-http/httplug": "^1.0|^2.0", + "psr/http-client": "^1.0", + "symfony/dependency-injection": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/messenger": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0", + "symfony/stopwatch": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously", + "homepage": "https://symfony.com", + "keywords": [ + "http" + ], + "support": { + "source": "https://github.com/symfony/http-client/tree/v7.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" + }, + { + "name": "symfony/http-client-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-client-contracts.git", + "reference": "20414d96f391677bf80078aa55baece78b82647d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/20414d96f391677bf80078aa55baece78b82647d", + "reference": "20414d96f391677bf80078aa55baece78b82647d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\HttpClient\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to HTTP clients", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/http-client-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "reference": "bd1d9e59a81d8fa4acdcea3f617c581f7475a80f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.5.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:32:20+00:00" + } + ], "packages-dev": [ + { + "name": "masterminds/html5", + "version": "2.9.0", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "reference": "f5ac2c0b0a2eefca70b2ce32a5809992227e75a6", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8 || ^9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.9.0" + }, + "time": "2024-03-31T07:05:07+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.11.1", @@ -732,57 +1223,63 @@ "time": "2024-02-02T06:12:57+00:00" }, { - "name": "psr/container", - "version": "2.0.2", + "name": "phpunit/phpunit-selenium", + "version": "1.3.3", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + "url": "https://github.com/giorgiosironi/phpunit-selenium.git", + "reference": "e89bfa1080dce9617c9b3e7760d50752974bfbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "url": "https://api.github.com/repos/giorgiosironi/phpunit-selenium/zipball/e89bfa1080dce9617c9b3e7760d50752974bfbd2", + "reference": "e89bfa1080dce9617c9b3e7760d50752974bfbd2", "shasum": "" }, "require": { - "php": ">=7.4.0" + "ext-curl": "*", + "ext-dom": "*", + "php": ">=5.3.3", + "phpunit/phpunit": ">=3.7.0@stable" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } + "classmap": [ + "PHPUnit/" + ] }, "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + }, + { + "name": "Giorgio Sironi", + "email": "info@giorgiosironi.com", + "role": "developer" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Selenium Server integration for PHPUnit", + "homepage": "http://www.phpunit.de/", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "selenium", + "testing", + "xunit" ], "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" + "irc": "irc://irc.freenode.net/phpunit", + "issues": "https://github.com/sebastianbergmann/phpunit-selenium/issues", + "source": "https://github.com/giorgiosironi/phpunit-selenium/tree/1.3.3" }, - "time": "2021-11-05T16:47:00+00:00" + "time": "2013-11-22T08:54:11+00:00" }, { "name": "sebastian/cli-parser", @@ -1707,6 +2204,74 @@ ], "time": "2024-02-02T06:10:47+00:00" }, + { + "name": "symfony/browser-kit", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/browser-kit.git", + "reference": "0a48e67a7975c07d8cc0661fbbdddce56c58425e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/0a48e67a7975c07d8cc0661fbbdddce56c58425e", + "reference": "0a48e67a7975c07d8cc0661fbbdddce56c58425e", + "shasum": "" + }, + "require": { + "php": ">=8.2", + "symfony/dom-crawler": "^6.4|^7.0" + }, + "require-dev": { + "symfony/css-selector": "^6.4|^7.0", + "symfony/http-client": "^6.4|^7.0", + "symfony/mime": "^6.4|^7.0", + "symfony/process": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\BrowserKit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/browser-kit/tree/v7.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" + }, { "name": "symfony/console", "version": "v7.0.7", @@ -1800,6 +2365,219 @@ ], "time": "2024-04-18T09:29:19+00:00" }, + { + "name": "symfony/css-selector", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/css-selector.git", + "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", + "reference": "b08a4ad89e84b29cec285b7b1f781a7ae51cf4bc", + "shasum": "" + }, + "require": { + "php": ">=8.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Converts CSS selectors to XPath expressions", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/css-selector/tree/v7.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" + }, + { + "name": "symfony/dom-crawler", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "7cb4ae7166a8a36916be390dbb3819474fb06a29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7cb4ae7166a8a36916be390dbb3819474fb06a29", + "reference": "7cb4ae7166a8a36916be390dbb3819474fb06a29", + "shasum": "" + }, + "require": { + "masterminds/html5": "^2.6", + "php": ">=8.2", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "symfony/css-selector": "^6.4|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases DOM navigation for HTML and XML documents", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dom-crawler/tree/v7.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" + }, + { + "name": "symfony/phpunit-bridge", + "version": "v7.0.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/phpunit-bridge.git", + "reference": "0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9", + "reference": "0a0b90ba08b9a03e09ad49f8d613bdf3eca3a7a9", + "shasum": "" + }, + "require": { + "php": ">=7.2.5" + }, + "conflict": { + "phpunit/phpunit": "<7.5|9.1.2" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.5|^3.0", + "symfony/error-handler": "^5.4|^6.4|^7.0", + "symfony/polyfill-php81": "^1.27" + }, + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "thanks": { + "name": "phpunit/phpunit", + "url": "https://github.com/sebastianbergmann/phpunit" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides utilities for PHPUnit, especially user deprecation notices management", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/phpunit-bridge/tree/v7.0.7" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-04-18T09:29:19+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.29.0", @@ -2179,88 +2957,6 @@ ], "time": "2024-04-18T09:29:19+00:00" }, - { - "name": "symfony/service-contracts", - "version": "v3.4.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/service-contracts.git", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/11bbf19a0fb7b36345861e85c5768844c552906e", - "reference": "11bbf19a0fb7b36345861e85c5768844c552906e", - "shasum": "" - }, - "require": { - "php": ">=8.1", - "psr/container": "^1.1|^2.0" - }, - "conflict": { - "ext-psr": "<1.1|>=2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Service\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Generic abstractions related to writing services", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.4.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-12-19T21:51:00+00:00" - }, { "name": "symfony/string", "version": "v7.0.7", @@ -2347,6 +3043,58 @@ ], "time": "2024-04-18T09:29:19+00:00" }, + { + "name": "symfony/test-pack", + "version": "1.0.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/test-pack.git", + "reference": "03ab012f4aab784690d21417f7cdd7b432fd4e73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/test-pack/zipball/03ab012f4aab784690d21417f7cdd7b432fd4e73", + "reference": "03ab012f4aab784690d21417f7cdd7b432fd4e73", + "shasum": "" + }, + "require": { + "phpunit/phpunit": "*", + "symfony/browser-kit": "*", + "symfony/css-selector": "*", + "symfony/phpunit-bridge": "*" + }, + "require-dev": { + "phpunit/phpunit": "*", + "symfony/browser-kit": "*", + "symfony/css-selector": "*", + "symfony/phpunit-bridge": "*" + }, + "type": "symfony-pack", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A pack for functional and end-to-end testing within a Symfony app", + "support": { + "issues": "https://github.com/symfony/test-pack/issues", + "source": "https://github.com/symfony/test-pack/tree/1.0.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-04-15T12:25:45+00:00" + }, { "name": "theseer/tokenizer", "version": "1.2.3", diff --git a/index.php b/index.php index 42dc299..9e488bb 100644 --- a/index.php +++ b/index.php @@ -24,7 +24,7 @@ $uri_pos = 2; /* When testing with UniServer the URI array placement position will be * incremented by 1 due to the folder addition - * http://localhost/CustomerRewards/index.php/customer/process/select?limit=5 + * http://localhost/CustomerRewardsRESTAPI/index.php/customer/process/select?limit=5 * uri[1] = folder * uri[2] = index * uri[3] = module