diff --git a/src/symfony/Service/UploadedFileServiceInterface.php b/src/symfony/Service/UploadedFileServiceInterface.php index eaa4ee4c6..d8577c678 100644 --- a/src/symfony/Service/UploadedFileServiceInterface.php +++ b/src/symfony/Service/UploadedFileServiceInterface.php @@ -29,13 +29,6 @@ interface UploadedFileServiceInterface { */ const SERVICE_NAME = "wbw.core.service.uploaded_file"; - /** - * Get the directory. - * - * @return string|null Returns the directory. - */ - public function getDirectory(): ?string; - /** * Determines if a filename exists. * @@ -44,6 +37,13 @@ public function getDirectory(): ?string; */ public function exists(string $filename): bool; + /** + * Get the directory. + * + * @return string|null Returns the directory. + */ + public function getDirectory(): ?string; + /** * Path. * diff --git a/tests/core/Model/CpuTest.php b/tests/core/Model/CpuTest.php index 212bbb574..3d5002c2d 100644 --- a/tests/core/Model/CpuTest.php +++ b/tests/core/Model/CpuTest.php @@ -11,11 +11,10 @@ namespace WBW\Library\Core\Tests\Model; +use JsonSerializable; use WBW\Library\Core\Model\Cpu; use WBW\Library\Core\Tests\AbstractTestCase; -use JsonSerializable; - /** * CPU test. * diff --git a/tests/core/Model/CpuTest.testJsonSerialize.json b/tests/core/Model/CpuTest.testJsonSerialize.json index 7d3c4d508..0a7e08c28 100644 --- a/tests/core/Model/CpuTest.testJsonSerialize.json +++ b/tests/core/Model/CpuTest.testJsonSerialize.json @@ -1,10 +1,10 @@ { - "us":0.123456789, - "sy":0.234567891, - "ni":0.345678912, - "id":0.456789123, - "wa":0.567891234, - "hi":0.678912345, - "si":0.789123456, - "st":0.891234567 + "us": 0.123456789, + "sy": 0.234567891, + "ni": 0.345678912, + "id": 0.456789123, + "wa": 0.567891234, + "hi": 0.678912345, + "si": 0.789123456, + "st": 0.891234567 } diff --git a/tests/curl/Request/GetRequestTest.php b/tests/curl/Request/GetRequestTest.php index 988c83d5f..828373e47 100644 --- a/tests/curl/Request/GetRequestTest.php +++ b/tests/curl/Request/GetRequestTest.php @@ -74,37 +74,6 @@ public function testCallWithDebug(): void { $this->assertEquals(200, $res->getResponseInfo()["http_code"]); } - /** - * Tests call() method. - * - * @return void - * @throws Exception Throws an exception if an error occurs. - */ - public function testCallWithHttpCodes(): void { - - $obj = new GetRequest($this->curlConfiguration, $this->curlResourcePath); - - foreach (CurlHelper::enumCodes() as $code) { - - try { - - $obj->addQueryData("code", $code); - - $res = $obj->call(); - $this->assertEquals($code, $res->getResponseInfo()["http_code"]); - $this->assertGreaterThanOrEqual(200, $res->getResponseInfo()["http_code"]); - $this->assertLessThanOrEqual(299, $res->getResponseInfo()["http_code"]); - } catch (Exception $ex) { - - $this->assertInstanceOf(RequestCallException::class, $ex); - - /** @var RequestCallException $ex */ - $this->assertEquals($code, $ex->getCode()); - $this->assertEquals($code, $ex->getResponse()->getResponseInfo()["http_code"]); - } - } - } - /** * Tests call() method. * @@ -140,6 +109,37 @@ public function testCallWithHeaderApplicationJSON(): void { $this->assertEquals(200, $res->getResponseInfo()["http_code"]); } + /** + * Tests call() method. + * + * @return void + * @throws Exception Throws an exception if an error occurs. + */ + public function testCallWithHttpCodes(): void { + + $obj = new GetRequest($this->curlConfiguration, $this->curlResourcePath); + + foreach (CurlHelper::enumCodes() as $code) { + + try { + + $obj->addQueryData("code", $code); + + $res = $obj->call(); + $this->assertEquals($code, $res->getResponseInfo()["http_code"]); + $this->assertGreaterThanOrEqual(200, $res->getResponseInfo()["http_code"]); + $this->assertLessThanOrEqual(299, $res->getResponseInfo()["http_code"]); + } catch (Exception $ex) { + + $this->assertInstanceOf(RequestCallException::class, $ex); + + /** @var RequestCallException $ex */ + $this->assertEquals($code, $ex->getCode()); + $this->assertEquals($code, $ex->getResponse()->getResponseInfo()["http_code"]); + } + } + } + /** * Tests call() method. * diff --git a/tests/sorter/Helper/AlphabeticalTreeNodeHelperTest.php b/tests/sorter/Helper/AlphabeticalTreeNodeHelperTest.php index 5306f56ed..163658409 100644 --- a/tests/sorter/Helper/AlphabeticalTreeNodeHelperTest.php +++ b/tests/sorter/Helper/AlphabeticalTreeNodeHelperTest.php @@ -98,7 +98,6 @@ public function testRemoveOrphan(): void { $this->assertCount(7, $this->nodes); } - /** * Tests sort() * diff --git a/tests/symfony/Service/TokenGeneratorServiceInterfaceTest.php b/tests/symfony/Service/TokenGeneratorServiceInterfaceTest.php index 4b33c6d93..7fcf00aaf 100644 --- a/tests/symfony/Service/TokenGeneratorServiceInterfaceTest.php +++ b/tests/symfony/Service/TokenGeneratorServiceInterfaceTest.php @@ -11,7 +11,6 @@ namespace WBW\Library\Symfony\Tests\Service; -use WBW\Library\Symfony\Service\TokenGeneratorService; use WBW\Library\Symfony\Service\TokenGeneratorServiceInterface; use WBW\Library\Symfony\Tests\AbstractTestCase; diff --git a/tests/symfony/Service/TokenGeneratorServiceTraitTest.php b/tests/symfony/Service/TokenGeneratorServiceTraitTest.php index 65551353e..e36d54c66 100644 --- a/tests/symfony/Service/TokenGeneratorServiceTraitTest.php +++ b/tests/symfony/Service/TokenGeneratorServiceTraitTest.php @@ -11,7 +11,6 @@ namespace WBW\Library\Symfony\Tests\Service; -use WBW\Library\Symfony\Service\TokenGeneratorService; use WBW\Library\Symfony\Service\TokenGeneratorServiceInterface; use WBW\Library\Symfony\Tests\AbstractTestCase; use WBW\Library\Symfony\Tests\Fixtures\Service\TestTokenGeneratorServiceTrait; diff --git a/tests/symfony/Service/UploadedFileServiceInterfaceTest.php b/tests/symfony/Service/UploadedFileServiceInterfaceTest.php index f933021fc..726a8f596 100644 --- a/tests/symfony/Service/UploadedFileServiceInterfaceTest.php +++ b/tests/symfony/Service/UploadedFileServiceInterfaceTest.php @@ -11,7 +11,6 @@ namespace WBW\Library\Symfony\Tests\Service; -use WBW\Library\Symfony\Service\TokenGeneratorService; use WBW\Library\Symfony\Service\UploadedFileServiceInterface; use WBW\Library\Symfony\Tests\AbstractTestCase;