From 4db471626ad259049401af93c509f2d481ff70b3 Mon Sep 17 00:00:00 2001 From: webeweb Date: Tue, 28 May 2024 12:44:50 +0200 Subject: [PATCH] Code checkstyle --- lib/curl/Tests/Factory/CurlFactoryTest.php | 1 - lib/curl/Tests/Request/GetRequestTest.php | 1 - .../Tests/Provider/ApiProviderTest.php | 1 - .../Provider/General/ApiProviderTest.php | 12 ------------ .../Provider/Products/ApiProviderTest.php | 12 ------------ .../Provider/Suppliers/ApiProviderTest.php | 2 -- lib/ftp/Tests/Client/FtpClientTest.php | 16 ---------------- lib/ftp/Tests/Client/FtpsClientTest.php | 1 - lib/ftp/Tests/Client/SftpClientTest.php | 7 ------- .../Tests/Factory/QueryBuilderFactoryTest.php | 2 -- .../Tests/Model/AbstractQueryBuilderTest.php | 2 -- .../Tests/Model/QueryBuilderFilterTest.php | 1 - .../Tests/Model/QueryBuilderRuleSetTest.php | 1 - .../Tests/Model/QueryBuilderRuleTest.php | 1 - .../Tests/Component/AbstractImageTest.php | 1 - lib/widget/Tests/Helper/AssetsHelperTest.php | 2 -- .../MicrosoftAccessDatabaseConnectorTest.php | 2 -- ...icrosoftSqlServerDatabaseConnectorTest.php | 1 - .../OracleMySQLDatabaseConnectorTest.php | 1 - tests/Helper/DateTimeHelperTest.php | 1 - tests/Helper/DateTimeMethodTest.php | 15 --------------- tests/Helper/DoubleHelperTest.php | 1 - tests/Helper/FloatHelperTest.php | 2 -- tests/Helper/IntegerHelperTest.php | 1 - tests/Helper/TypeHelperTest.php | 19 ------------------- tests/Model/Planning/TimeSlotTest.php | 1 - tests/Monitor/SystemMonitorTest.php | 10 ---------- tests/Provider/AbstractProviderTest.php | 1 - .../Traits/Integers/IntegerPortTraitTest.php | 2 -- tests/Utility/ArchiveUtilityTest.php | 1 - tests/Utility/SystemHelperTest.php | 6 ------ 31 files changed, 127 deletions(-) diff --git a/lib/curl/Tests/Factory/CurlFactoryTest.php b/lib/curl/Tests/Factory/CurlFactoryTest.php index 54119fe1c..2e1d09d39 100644 --- a/lib/curl/Tests/Factory/CurlFactoryTest.php +++ b/lib/curl/Tests/Factory/CurlFactoryTest.php @@ -83,7 +83,6 @@ public function testNewCurlRequestWithHead(): void { public function testNewCurlRequestWithInvalidArgumentException(): void { try { - CurlFactory::newCurlRequest("exception"); } catch (Throwable $ex) { diff --git a/lib/curl/Tests/Request/GetRequestTest.php b/lib/curl/Tests/Request/GetRequestTest.php index 4224f0b1e..48f73fc36 100644 --- a/lib/curl/Tests/Request/GetRequestTest.php +++ b/lib/curl/Tests/Request/GetRequestTest.php @@ -171,7 +171,6 @@ public function testCallWithRequestTimeoutException(): void { $obj->addQueryData("sleep", "60"); try { - $obj->call(); } catch (Throwable $ex) { diff --git a/lib/easilys/Tests/Provider/ApiProviderTest.php b/lib/easilys/Tests/Provider/ApiProviderTest.php index 7208f5e8e..61fd97a12 100644 --- a/lib/easilys/Tests/Provider/ApiProviderTest.php +++ b/lib/easilys/Tests/Provider/ApiProviderTest.php @@ -40,7 +40,6 @@ public function testLogin(): void { $this->assertEquals($this->easilys["endpoint"], $res->getEndpointPath()); $this->assertNotEmpty($res->getAccessToken()); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } diff --git a/lib/easilys/Tests/Provider/General/ApiProviderTest.php b/lib/easilys/Tests/Provider/General/ApiProviderTest.php index 14849cbf9..b3e54672d 100644 --- a/lib/easilys/Tests/Provider/General/ApiProviderTest.php +++ b/lib/easilys/Tests/Provider/General/ApiProviderTest.php @@ -49,10 +49,8 @@ public function testGetSite(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetSitesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -72,10 +70,8 @@ public function testGetSites(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetSitesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -97,10 +93,8 @@ public function testGetSitesFromTreeWithParent(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetSitesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -121,10 +115,8 @@ public function testGetSitesNotInTree(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetSitesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -145,10 +137,8 @@ public function testGetSitesRoot(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetSitesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -170,10 +160,8 @@ public function testGetSitesRootTree(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetSitesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } diff --git a/lib/easilys/Tests/Provider/Products/ApiProviderTest.php b/lib/easilys/Tests/Provider/Products/ApiProviderTest.php index 699ff8b98..a944720bd 100644 --- a/lib/easilys/Tests/Provider/Products/ApiProviderTest.php +++ b/lib/easilys/Tests/Provider/Products/ApiProviderTest.php @@ -54,10 +54,8 @@ public function testGetPriceListHeadersSite(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetPriceListHeadersSiteResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -78,10 +76,8 @@ public function testGetPriceListSupplierProductsSite(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetPriceListSupplierProductsSiteResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -102,10 +98,8 @@ public function testGetProductsSite(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetProductsSiteResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -125,10 +119,8 @@ public function testGetQualities(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetQualitiesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -148,10 +140,8 @@ public function testGetRanges(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetRangesResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } @@ -171,10 +161,8 @@ public function testGetUnits(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetUnitsResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } diff --git a/lib/easilys/Tests/Provider/Suppliers/ApiProviderTest.php b/lib/easilys/Tests/Provider/Suppliers/ApiProviderTest.php index 486af7698..e9f13c03f 100644 --- a/lib/easilys/Tests/Provider/Suppliers/ApiProviderTest.php +++ b/lib/easilys/Tests/Provider/Suppliers/ApiProviderTest.php @@ -44,10 +44,8 @@ public function testGetStorehousesSite(): void { try { $res = $obj->sendRequest($request); - $this->assertInstanceOf(GetStorehousesSiteResponse::class, $res); } catch (Throwable $ex) { - $this->assertInstanceOf(ProviderException::class, $ex); } } diff --git a/lib/ftp/Tests/Client/FtpClientTest.php b/lib/ftp/Tests/Client/FtpClientTest.php index 731c55245..185f4d3d4 100644 --- a/lib/ftp/Tests/Client/FtpClientTest.php +++ b/lib/ftp/Tests/Client/FtpClientTest.php @@ -109,7 +109,6 @@ public function testChdirWithFtpException(): void { $obj = $this->client; try { - $obj->chdir("/chdir"); } catch (Throwable $ex) { @@ -136,7 +135,6 @@ public function testChmod(): void { $obj = $this->client; try { - $obj->chmod(0644, $this->remoteFile); } catch (Throwable $ex) { @@ -166,7 +164,6 @@ public function testConnectWithFtpException(): void { $obj->getAuthenticator()->setPort(80); try { - $obj->connect(3); } catch (Throwable $ex) { @@ -195,7 +192,6 @@ public function testDelete(): void { $obj = $this->client; try { - $obj->delete($this->remoteFile); } catch (Throwable $ex) { @@ -250,7 +246,6 @@ public function testFgetWithFtpException(): void { $obj = $this->client; try { - $obj->fget($localStream, "/fget"); } catch (Throwable $ex) { @@ -284,7 +279,6 @@ public function testFput(): void { $obj = $this->client; try { - $obj->fput("/fput", $localStream); } catch (Throwable $ex) { @@ -328,7 +322,6 @@ public function testGetWithFtpException(): void { $obj = $this->client; try { - $obj->get($this->localFile, "/get"); } catch (Throwable $ex) { @@ -359,7 +352,6 @@ public function testLoginWithFtpException(): void { $obj->connect(); try { - $obj->login(); } catch (Throwable $ex) { @@ -403,7 +395,6 @@ public function testMdtmWithFtpException(): void { $obj = $this->client; try { - $obj->mdtm("/mdtm"); } catch (Throwable $ex) { @@ -430,7 +421,6 @@ public function testMkdir(): void { $obj = $this->client; try { - $obj->mkdir("/mkdir"); } catch (Throwable $ex) { @@ -548,7 +538,6 @@ public function testNlistWithFtpException(): void { $obj = $this->client; try { - $obj->nlist("/nlist"); } catch (Throwable $ex) { @@ -575,7 +564,6 @@ public function testPut(): void { $obj = $this->client; try { - $obj->put($this->myself, "/put"); } catch (Throwable $ex) { @@ -619,7 +607,6 @@ public function testRawListWithFtpException(): void { $obj = $this->client; try { - $obj->rawList("/rawList"); } catch (Throwable $ex) { @@ -661,7 +648,6 @@ public function testRename(): void { $obj = $this->client; try { - $obj->rename($this->remoteDir, "/rename"); } catch (Throwable $ex) { @@ -690,7 +676,6 @@ public function testRmdir(): void { $obj = $this->client; try { - $obj->rmdir($this->remoteDir); } catch (Throwable $ex) { @@ -734,7 +719,6 @@ public function testSizetWithFtpException(): void { $obj = $this->client; try { - $obj->size("/size"); } catch (Throwable $ex) { diff --git a/lib/ftp/Tests/Client/FtpsClientTest.php b/lib/ftp/Tests/Client/FtpsClientTest.php index 463924204..7760dc410 100644 --- a/lib/ftp/Tests/Client/FtpsClientTest.php +++ b/lib/ftp/Tests/Client/FtpsClientTest.php @@ -73,7 +73,6 @@ public function testConnectWithFtpException(): void { $obj->getAuthenticator()->setPort(80); try { - $obj->connect(3); } catch (Throwable $ex) { diff --git a/lib/ftp/Tests/Client/SftpClientTest.php b/lib/ftp/Tests/Client/SftpClientTest.php index e7fd40c41..6a04d471f 100644 --- a/lib/ftp/Tests/Client/SftpClientTest.php +++ b/lib/ftp/Tests/Client/SftpClientTest.php @@ -76,7 +76,6 @@ public function testConnectWithFtpException(): void { $obj->getAuthenticator()->setPort(80); try { - $obj->connect(); } catch (Throwable $ex) { @@ -105,7 +104,6 @@ public function testDelete(): void { $obj = $this->client; try { - $obj->delete($this->remoteDir); } catch (Throwable $ex) { @@ -151,7 +149,6 @@ public function testLoginWithFtpException(): void { $obj->connect(); try { - $obj->login(); } catch (Throwable $ex) { @@ -178,7 +175,6 @@ public function testMkdir(): void { $obj = $this->client; try { - $obj->mkdir("/mkdir"); } catch (Throwable $ex) { @@ -208,7 +204,6 @@ public function testPut(): void { $obj = $this->client; try { - $obj->put($myself, "/put"); } catch (Throwable $ex) { @@ -235,7 +230,6 @@ public function testRename(): void { $obj = $this->client; try { - $obj->rename($this->remoteDir, "/rename"); } catch (Throwable $ex) { @@ -264,7 +258,6 @@ public function testRmdir(): void { $obj = $this->client; try { - $obj->rmdir($this->remoteDir); } catch (Throwable $ex) { diff --git a/lib/querybuilder/Tests/Factory/QueryBuilderFactoryTest.php b/lib/querybuilder/Tests/Factory/QueryBuilderFactoryTest.php index 5a11ff51a..acc14c882 100644 --- a/lib/querybuilder/Tests/Factory/QueryBuilderFactoryTest.php +++ b/lib/querybuilder/Tests/Factory/QueryBuilderFactoryTest.php @@ -110,7 +110,6 @@ public function testNewQueryBuilderOperator(): void { public function testNewQueryBuilderOperatorWithInvalidArgumentException(): void { try { - QueryBuilderFactory::newQueryBuilderOperator("operator"); } catch (Throwable $ex) { @@ -145,7 +144,6 @@ public function testNewQueryBuilderType(): void { public function testNewQueryBuilderTypeWithInvalidArgumentException(): void { try { - QueryBuilderFactory::newQueryBuilderType("type"); } catch (Throwable $ex) { diff --git a/lib/querybuilder/Tests/Model/AbstractQueryBuilderTest.php b/lib/querybuilder/Tests/Model/AbstractQueryBuilderTest.php index ca8b25a1a..0af8d31d6 100644 --- a/lib/querybuilder/Tests/Model/AbstractQueryBuilderTest.php +++ b/lib/querybuilder/Tests/Model/AbstractQueryBuilderTest.php @@ -77,7 +77,6 @@ public function testSetInputWithInvalidArgumentException(): void { $obj = new TestAbstractQueryBuilder(); try { - $obj->setInput("input"); } catch (Throwable $ex) { @@ -109,7 +108,6 @@ public function testSetTypeWithInvalidArgumentException(): void { $obj = new TestAbstractQueryBuilder(); try { - $obj->setType("type"); } catch (Throwable $ex) { diff --git a/lib/querybuilder/Tests/Model/QueryBuilderFilterTest.php b/lib/querybuilder/Tests/Model/QueryBuilderFilterTest.php index 2ede8d82f..2b3169604 100644 --- a/lib/querybuilder/Tests/Model/QueryBuilderFilterTest.php +++ b/lib/querybuilder/Tests/Model/QueryBuilderFilterTest.php @@ -109,7 +109,6 @@ public function testSetOperatorsWithInvalidArgumentException(): void { $obj = new QueryBuilderFilter("id", QueryBuilderTypeInterface::TYPE_BOOLEAN, []); try { - $obj->setOperators(["exception"]); } catch (Throwable $ex) { diff --git a/lib/querybuilder/Tests/Model/QueryBuilderRuleSetTest.php b/lib/querybuilder/Tests/Model/QueryBuilderRuleSetTest.php index 97c90137e..2acc8ae72 100644 --- a/lib/querybuilder/Tests/Model/QueryBuilderRuleSetTest.php +++ b/lib/querybuilder/Tests/Model/QueryBuilderRuleSetTest.php @@ -86,7 +86,6 @@ public function testSetConditionWithInvalidArgumentException(): void { $obj = new QueryBuilderRuleSet(); try { - $obj->setCondition("condition"); } catch (Throwable $ex) { diff --git a/lib/querybuilder/Tests/Model/QueryBuilderRuleTest.php b/lib/querybuilder/Tests/Model/QueryBuilderRuleTest.php index 45c7f6a6f..ddd08cb31 100644 --- a/lib/querybuilder/Tests/Model/QueryBuilderRuleTest.php +++ b/lib/querybuilder/Tests/Model/QueryBuilderRuleTest.php @@ -68,7 +68,6 @@ public function testSetOperatorWithInvalidArgumentException(): void { $obj = new QueryBuilderRule(); try { - $obj->setOperator("operator"); } catch (Throwable $ex) { diff --git a/lib/widget/Tests/Component/AbstractImageTest.php b/lib/widget/Tests/Component/AbstractImageTest.php index ed882151e..b7a0d70fd 100644 --- a/lib/widget/Tests/Component/AbstractImageTest.php +++ b/lib/widget/Tests/Component/AbstractImageTest.php @@ -67,7 +67,6 @@ public function test__constructWithInvalidArgumentException(): void { $pathname = getcwd() . "/exception.txt"; try { - new TestImage($pathname); } catch (Throwable $ex) { diff --git a/lib/widget/Tests/Helper/AssetsHelperTest.php b/lib/widget/Tests/Helper/AssetsHelperTest.php index 0abda106e..dde3fe75f 100644 --- a/lib/widget/Tests/Helper/AssetsHelperTest.php +++ b/lib/widget/Tests/Helper/AssetsHelperTest.php @@ -81,7 +81,6 @@ public function testListAssets(): void { public function testListAssetsWithInvalidArgumentException(): void { try { - AssetsHelper::listAssets($this->notDirectory); } catch (Throwable $ex) { @@ -115,7 +114,6 @@ public function testUnzipAssets(): void { public function testUnzipAssetsWithInvalidArgumentException(): void { try { - AssetsHelper::unzipAssets($this->srcDirectory, $this->notDirectory); } catch (Throwable $ex) { diff --git a/tests/Database/Connector/MicrosoftAccessDatabaseConnectorTest.php b/tests/Database/Connector/MicrosoftAccessDatabaseConnectorTest.php index a5246f615..36fecd8aa 100644 --- a/tests/Database/Connector/MicrosoftAccessDatabaseConnectorTest.php +++ b/tests/Database/Connector/MicrosoftAccessDatabaseConnectorTest.php @@ -60,7 +60,6 @@ public function testGetConnectionWithInvalidArgumentException(): void { $obj = new MicrosoftAccessDatabaseConnector($this->authenticator, "exception"); try { - $obj->getConnection(); } catch (Throwable $ex) { @@ -82,7 +81,6 @@ public function testGetConnectionWithPDOException(): void { $obj = new MicrosoftAccessDatabaseConnector($this->authenticator, $mdb); try { - $obj->getConnection(); } catch (Throwable $ex) { diff --git a/tests/Database/Connector/MicrosoftSqlServerDatabaseConnectorTest.php b/tests/Database/Connector/MicrosoftSqlServerDatabaseConnectorTest.php index d7f5040ce..887cd4a89 100644 --- a/tests/Database/Connector/MicrosoftSqlServerDatabaseConnectorTest.php +++ b/tests/Database/Connector/MicrosoftSqlServerDatabaseConnectorTest.php @@ -59,7 +59,6 @@ public function testGetConnectionWithPDOException(): void { $obj = new MicrosoftSqlServerDatabaseConnector($this->authenticator, "exception"); try { - $obj->getConnection(); } catch (Throwable $ex) { diff --git a/tests/Database/Connector/OracleMySQLDatabaseConnectorTest.php b/tests/Database/Connector/OracleMySQLDatabaseConnectorTest.php index 9aba384ec..6b846a0a3 100644 --- a/tests/Database/Connector/OracleMySQLDatabaseConnectorTest.php +++ b/tests/Database/Connector/OracleMySQLDatabaseConnectorTest.php @@ -59,7 +59,6 @@ public function testGetConnectionWithPDOException(): void { $obj = new OracleMySQLDatabaseConnector($this->authenticator, "exception"); try { - $obj->getConnection(); } catch (Throwable $ex) { diff --git a/tests/Helper/DateTimeHelperTest.php b/tests/Helper/DateTimeHelperTest.php index 7684294da..2a6801b28 100644 --- a/tests/Helper/DateTimeHelperTest.php +++ b/tests/Helper/DateTimeHelperTest.php @@ -49,7 +49,6 @@ public function testCompare(): void { public function testCompareWithInvalidArgumentException(): void { try { - DateTimeHelper::compare(new DateTime("2018-08-22 14:05:00", new DateTimeZone("UTC")), new DateTime("2018-08-22 14:05:00", new DateTimeZone("Europe/Paris"))); } catch (Throwable $ex) { diff --git a/tests/Helper/DateTimeMethodTest.php b/tests/Helper/DateTimeMethodTest.php index a028e6f76..8276d8e26 100644 --- a/tests/Helper/DateTimeMethodTest.php +++ b/tests/Helper/DateTimeMethodTest.php @@ -51,7 +51,6 @@ public function testAddDay(): void { public function testAddDayWithInvalidArgumentException(): void { try { - DateTimeMethod::addDay(new DateTime(), -1); } catch (Throwable $ex) { @@ -83,7 +82,6 @@ public function testAddHour(): void { public function testAddHourWithInvalidArgumentException(): void { try { - DateTimeMethod::addHour(new DateTime(), -1); } catch (Throwable $ex) { @@ -116,7 +114,6 @@ public function testAddInterval(): void { public function testAddIntervalWithInvalidArgumentException(): void { try { - DateTimeMethod::addInterval(new DateTime(), 0, 0, 0, 0, 0, -1); } catch (Throwable $ex) { @@ -148,7 +145,6 @@ public function testAddMinute(): void { public function testAddMinuteWithInvalidArgumentException(): void { try { - DateTimeMethod::addMinute(new DateTime(), -1); } catch (Throwable $ex) { @@ -181,7 +177,6 @@ public function testAddMonth(): void { public function testAddMonthWithInvalidArgumentException(): void { try { - DateTimeMethod::addMonth(new DateTime(), -1); } catch (Throwable $ex) { @@ -213,7 +208,6 @@ public function testAddSecond(): void { public function testAddSecondWithInvalidArgumentException(): void { try { - DateTimeMethod::addSecond(new DateTime(), -1); } catch (Throwable $ex) { @@ -246,7 +240,6 @@ public function testAddYear(): void { public function testAddYearWithInvalidArgumentException(): void { try { - DateTimeMethod::addYear(new DateTime(), -1); } catch (Throwable $ex) { @@ -316,7 +309,6 @@ public function testModInterval(): void { public function testModIntervalWithInvalidArgumentException(): void { try { - DateTimeMethod::modInterval(new DateTime(), -1, 0, 0, 0, 0, 1); } catch (Throwable $ex) { @@ -414,7 +406,6 @@ public function testSubDay(): void { public function testSubDayWithInvalidArgumentException(): void { try { - DateTimeMethod::subDay(new DateTime(), -1); } catch (Throwable $ex) { @@ -446,7 +437,6 @@ public function testSubHour(): void { public function testSubHourWithInvalidArgumentException(): void { try { - DateTimeMethod::subHour(new DateTime(), -1); } catch (Throwable $ex) { @@ -479,7 +469,6 @@ public function testSubInterval(): void { public function testSubIntervalWithInvalidArgumentException(): void { try { - DateTimeMethod::subInterval(new DateTime(), 0, 0, 0, 0, 0, -1); } catch (Throwable $ex) { @@ -511,7 +500,6 @@ public function testSubMinute(): void { public function testSubMinuteWithInvalidArgumentException(): void { try { - DateTimeMethod::subMinute(new DateTime(), -1); } catch (Throwable $ex) { @@ -543,7 +531,6 @@ public function testSubMonth(): void { public function testSubMonthWithInvalidArgumentException(): void { try { - DateTimeMethod::subMonth(new DateTime(), -1); } catch (Throwable $ex) { @@ -575,7 +562,6 @@ public function testSubSecond(): void { public function testSubSecondWithInvalidArgumentException(): void { try { - DateTimeMethod::subSecond(new DateTime(), -1); } catch (Throwable $ex) { @@ -607,7 +593,6 @@ public function testSubYear(): void { public function testSubYearWithInvalidArgumentException(): void { try { - DateTimeMethod::subYear(new DateTime(), -1); } catch (Throwable $ex) { diff --git a/tests/Helper/DoubleHelperTest.php b/tests/Helper/DoubleHelperTest.php index 26a12a2c4..9f5d8b4d6 100644 --- a/tests/Helper/DoubleHelperTest.php +++ b/tests/Helper/DoubleHelperTest.php @@ -50,7 +50,6 @@ public function testParseString(): void { public function testParseStringWithFloatArgumentException(): void { try { - DoubleHelper::parseString("1A"); } catch (Throwable $ex) { diff --git a/tests/Helper/FloatHelperTest.php b/tests/Helper/FloatHelperTest.php index 8c859f674..06ee9ad7a 100644 --- a/tests/Helper/FloatHelperTest.php +++ b/tests/Helper/FloatHelperTest.php @@ -50,7 +50,6 @@ public function testCalcPercent(): void { public function testCalcPercentWithInvalidArgumentException(): void { try { - FloatHelper::calcPercent(0, 0); } catch (Throwable $ex) { @@ -83,7 +82,6 @@ public function testParseString(): void { public function testParseStringWithFloatArgumentException(): void { try { - FloatHelper::parseString("1A"); } catch (Throwable $ex) { diff --git a/tests/Helper/IntegerHelperTest.php b/tests/Helper/IntegerHelperTest.php index 96b42e224..85e53ebe1 100644 --- a/tests/Helper/IntegerHelperTest.php +++ b/tests/Helper/IntegerHelperTest.php @@ -58,7 +58,6 @@ public function testParseString(): void { public function testParseStringWithIntegerArgumentException(): void { try { - IntegerHelper::parseString("1.0"); } catch (Throwable $ex) { diff --git a/tests/Helper/TypeHelperTest.php b/tests/Helper/TypeHelperTest.php index 9025ac4aa..e212383d5 100644 --- a/tests/Helper/TypeHelperTest.php +++ b/tests/Helper/TypeHelperTest.php @@ -68,7 +68,6 @@ public function testIsTypeOf(): void { public function testIsTypeOfWithArrayArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_ARRAY); } catch (Throwable $ex) { @@ -85,7 +84,6 @@ public function testIsTypeOfWithArrayArgumentException(): void { public function testIsTypeOfWithBooleanArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_BOOLEAN); } catch (Throwable $ex) { @@ -102,7 +100,6 @@ public function testIsTypeOfWithBooleanArgumentException(): void { public function testIsTypeOfWithDateArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_DATE); } catch (Throwable $ex) { @@ -119,7 +116,6 @@ public function testIsTypeOfWithDateArgumentException(): void { public function testIsTypeOfWithDoubleArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_DOUBLE); } catch (Throwable $ex) { @@ -136,7 +132,6 @@ public function testIsTypeOfWithDoubleArgumentException(): void { public function testIsTypeOfWithFloatArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_FLOAT); } catch (Throwable $ex) { @@ -153,7 +148,6 @@ public function testIsTypeOfWithFloatArgumentException(): void { public function testIsTypeOfWithIntegerArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_INTEGER); } catch (Throwable $ex) { @@ -170,7 +164,6 @@ public function testIsTypeOfWithIntegerArgumentException(): void { public function testIsTypeOfWithInvalidArgumentException(): void { try { - TypeHelper::isTypeOf(null, -1); } catch (Throwable $ex) { @@ -187,7 +180,6 @@ public function testIsTypeOfWithInvalidArgumentException(): void { public function testIsTypeOfWithNumberArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_NUMBER); } catch (Throwable $ex) { @@ -204,7 +196,6 @@ public function testIsTypeOfWithNumberArgumentException(): void { public function testIsTypeOfWithObjectArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_OBJECT); } catch (Throwable $ex) { @@ -221,7 +212,6 @@ public function testIsTypeOfWithObjectArgumentException(): void { public function testIsTypeOfWithResourceArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_RESOURCE); } catch (Throwable $ex) { @@ -238,7 +228,6 @@ public function testIsTypeOfWithResourceArgumentException(): void { public function testIsTypeOfWithStringArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_STRING); } catch (Throwable $ex) { @@ -255,7 +244,6 @@ public function testIsTypeOfWithStringArgumentException(): void { public function testIsTypeOfWithTimestampArgumentException(): void { try { - TypeHelper::isTypeOf(null, TypeHelper::TYPE_TIMESTAMP); } catch (Throwable $ex) { @@ -288,7 +276,6 @@ public function testTransform(): void { public function testTransformWithDateArgumentException(): void { try { - TypeHelper::transform("exception", TypeHelper::TYPE_DATE, "Y-m-d"); } catch (Throwable $ex) { @@ -305,7 +292,6 @@ public function testTransformWithDateArgumentException(): void { public function testTransformWithInvalidArgumentException(): void { try { - TypeHelper::transform(null, TypeHelper::TYPE_ARRAY); } catch (Throwable $ex) { @@ -322,7 +308,6 @@ public function testTransformWithInvalidArgumentException(): void { public function testTransformWithInvalidArgumentException104(): void { try { - TypeHelper::transform(null, TypeHelper::TYPE_RESOURCE); } catch (Throwable $ex) { @@ -339,7 +324,6 @@ public function testTransformWithInvalidArgumentException104(): void { public function testTransformWithInvalidArgumentException116(): void { try { - TypeHelper::transform(null, TypeHelper::TYPE_TIMESTAMP); } catch (Throwable $ex) { @@ -356,7 +340,6 @@ public function testTransformWithInvalidArgumentException116(): void { public function testTransformWithInvalidArgumentException30(): void { try { - TypeHelper::transform(null, TypeHelper::TYPE_DATE); } catch (Throwable $ex) { @@ -373,7 +356,6 @@ public function testTransformWithInvalidArgumentException30(): void { public function testTransformWithInvalidArgumentException55(): void { try { - TypeHelper::transform(null, TypeHelper::TYPE_OBJECT); } catch (Throwable $ex) { @@ -407,7 +389,6 @@ public function testTransformWithInvalidArgumentException73(): void { public function testTransformWithTimestampArgumentException(): void { try { - TypeHelper::transform("exception", TypeHelper::TYPE_TIMESTAMP, "Y-m-d H:m:s"); } catch (Throwable $ex) { diff --git a/tests/Model/Planning/TimeSlotTest.php b/tests/Model/Planning/TimeSlotTest.php index e045db50e..b92be58ca 100644 --- a/tests/Model/Planning/TimeSlotTest.php +++ b/tests/Model/Planning/TimeSlotTest.php @@ -210,7 +210,6 @@ public function test__construct(): void { public function test__constructWithException(): void { try { - new TimeSlot($this->endDate, $this->startDate); } catch (Throwable $ex) { diff --git a/tests/Monitor/SystemMonitorTest.php b/tests/Monitor/SystemMonitorTest.php index a51b00be7..781645620 100644 --- a/tests/Monitor/SystemMonitorTest.php +++ b/tests/Monitor/SystemMonitorTest.php @@ -37,7 +37,6 @@ public function testGetCpu(): void { try { $res = SystemMonitor::getCpu(); - $this->assertNotNull($res); } catch (Throwable $ex) { @@ -56,7 +55,6 @@ public function testGetDate(): void { try { $res = SystemMonitor::getDate(); - $this->assertNotNull($res); } catch (Throwable $ex) { @@ -75,7 +73,6 @@ public function testGetHardDisks(): void { try { $res = SystemMonitor::getHardDisks(); - $this->assertNotCount(0, $res); } catch (Throwable $ex) { @@ -94,7 +91,6 @@ public function testGetHostname(): void { try { $res = SystemMonitor::getHostname(); - $this->assertNotNull($res); } catch (Throwable $ex) { @@ -113,7 +109,6 @@ public function testGetMemory(): void { try { $res = SystemMonitor::getMemory(); - $this->assertNotNull($res); } catch (Throwable $ex) { @@ -132,7 +127,6 @@ public function testGetNetwork(): void { try { $res = SystemMonitor::getNetwork(); - $this->assertNotNull($res); } catch (Throwable $ex) { @@ -151,7 +145,6 @@ public function testGetNetworkCards(): void { try { $res = SystemMonitor::getNetworkCards(); - $this->assertNotCount(0, $res); } catch (Throwable $ex) { @@ -170,7 +163,6 @@ public function testGetOperatingSystem(): void { try { $res = SystemMonitor::getOperatingSystem(); - $this->assertNotNull($res); } catch (Throwable $ex) { @@ -189,7 +181,6 @@ public function testGetProcessors(): void { try { $res = SystemMonitor::getProcessors(); - $this->assertNotCount(0, $res); } catch (Throwable $ex) { @@ -229,7 +220,6 @@ public function testGetUptime(): void { try { $res = SystemMonitor::getUptime(); - $this->assertNotNull($res); } catch (Throwable $ex) { diff --git a/tests/Provider/AbstractProviderTest.php b/tests/Provider/AbstractProviderTest.php index f8a31ddb7..16f6baf97 100644 --- a/tests/Provider/AbstractProviderTest.php +++ b/tests/Provider/AbstractProviderTest.php @@ -74,7 +74,6 @@ public function testBuildResourcePathWithInvalidArgumentException(): void { $obj = new TestAbstractProvider(); try { - $obj->buildResourcePath($request); } catch (Throwable $ex) { diff --git a/tests/Traits/Integers/IntegerPortTraitTest.php b/tests/Traits/Integers/IntegerPortTraitTest.php index 2c5331f31..681bbd797 100644 --- a/tests/Traits/Integers/IntegerPortTraitTest.php +++ b/tests/Traits/Integers/IntegerPortTraitTest.php @@ -50,7 +50,6 @@ public function testSetPortWithGreaterThan65536(): void { $obj = new TestIntegerPortTrait(); try { - $obj->setPort(65537); } catch (Throwable $ex) { @@ -69,7 +68,6 @@ public function testSetPortWithLessThan1(): void { $obj = new TestIntegerPortTrait(); try { - $obj->setPort(-1); } catch (Throwable $ex) { diff --git a/tests/Utility/ArchiveUtilityTest.php b/tests/Utility/ArchiveUtilityTest.php index 46019c54d..4e1721695 100644 --- a/tests/Utility/ArchiveUtilityTest.php +++ b/tests/Utility/ArchiveUtilityTest.php @@ -82,7 +82,6 @@ public function testZipWithDirectory(): void { public function testZipWithInvalidArgumentException(): void { try { - ArchiveUtility::zip("exception", "exception.zip"); } catch (Throwable $ex) { diff --git a/tests/Utility/SystemHelperTest.php b/tests/Utility/SystemHelperTest.php index dd812c0e0..320604ff6 100644 --- a/tests/Utility/SystemHelperTest.php +++ b/tests/Utility/SystemHelperTest.php @@ -89,7 +89,6 @@ public function testRetrieveCpu(): void { public function testRetrieveDate(): void { try { - $this->assertNotNull(SystemUtility::retrieveDate()); } catch (Throwable $ex) { @@ -108,7 +107,6 @@ public function testRetrieveHardDisks(): void { try { $res = SystemUtility::retrieveHardDisks(); - $this->assertGreaterThanOrEqual(1, count($res)); } catch (Throwable $ex) { @@ -125,7 +123,6 @@ public function testRetrieveHardDisks(): void { public function testRetrieveHostname(): void { try { - $this->assertNotNull(SystemUtility::retrieveHostname()); } catch (Throwable $ex) { @@ -144,7 +141,6 @@ public function testRetrieveMemory(): void { try { $obj = SystemUtility::retrieveMemory(); - $this->assertNotCount(0, $obj->getValues()); foreach ($obj->getValues() as $current) { @@ -219,7 +215,6 @@ public function testRetrieveNetworkCards(): void { try { $res = SystemUtility::retrieveNetworkCards(); - $this->assertGreaterThan(1, count($res)); } catch (Throwable $ex) { @@ -312,7 +307,6 @@ public function testRetrieveProperties(): void { public function testRetrieveUptime(): void { try { - $this->assertNotNull(SystemUtility::retrieveUptime()); } catch (Throwable $ex) {