Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@
"laravel/dusk": "^8.2.2",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.6",
"pestphp/pest": "^3.8 || ^4.0",
"pestphp/pest-plugin-laravel": "^3.0 || ^4.0",
"php-parallel-lint/php-parallel-lint": "^1.1",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-mockery": "^2.0",
"phpunit/phpunit": "^11.5.3"
"phpunit/phpunit": "^11.5.33 || ^12.3.7"
},
"suggest": {
"ext-gmp": "Used for browser push notifications",
Expand All @@ -86,6 +88,7 @@
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": false
}
},
Expand Down
2,119 changes: 1,645 additions & 474 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
includes:
- phpstan-baseline.neon
- tests/phpstan/ignore-by-php-version.neon.php
- vendor/larastan/larastan/extension.neon
- vendor/phpstan/phpstan-mockery/extension.neon

Expand All @@ -20,7 +19,6 @@ parameters:
- tests

excludePaths:
- tests/phpstan/
- tests/Unit/Data/KafkaDBStoreTest.php
- LibreNMS/Data/Store/Kafka.php

Expand Down
2 changes: 1 addition & 1 deletion tests/AddHostCliTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use App\Models\Device;
use Illuminate\Foundation\Testing\DatabaseTransactions;

class AddHostCliTest extends DBTestCase
final class AddHostCliTest extends DBTestCase
{
use DatabaseTransactions;

Expand Down
2 changes: 1 addition & 1 deletion tests/AlertingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use RecursiveIteratorIterator;
use RegexIterator;

class AlertingTest extends TestCase
final class AlertingTest extends TestCase
{
public function testJsonAlertCollection(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/AuthHTTPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use function strip_tags;
use function strip_tags as strip_tags1;

class AuthHTTPTest extends TestCase
final class AuthHTTPTest extends TestCase
{
private $original_auth_mech;
private $server;
Expand Down
2 changes: 1 addition & 1 deletion tests/AuthSSOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use Illuminate\Support\Str;
use LibreNMS\Authentication\LegacyAuth;

class AuthSSOTest extends DBTestCase
final class AuthSSOTest extends DBTestCase
{
use DatabaseTransactions;

Expand Down
2 changes: 1 addition & 1 deletion tests/BasicApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
use App\Models\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;

class BasicApiTest extends DBTestCase
final class BasicApiTest extends DBTestCase
{
use DatabaseTransactions;

Expand Down
2 changes: 1 addition & 1 deletion tests/Browser/LoginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Class LoginTest
*/
#[Group('browser')]
class LoginTest extends DuskTestCase
final class LoginTest extends DuskTestCase
{
use DatabaseTruncation;
protected array $connectionsToTruncate = ['testing', 'testing_persistent'];
Expand Down
2 changes: 1 addition & 1 deletion tests/CommonFunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use LibreNMS\Util\StringHelpers;
use LibreNMS\Util\Validate;

class CommonFunctionsTest extends TestCase
final class CommonFunctionsTest extends TestCase
{
public function testStrContains(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use App\ConfigRepository;
use App\Facades\LibrenmsConfig;

class ConfigTest extends TestCase
final class ConfigTest extends TestCase
{
private \ReflectionProperty $config;

Expand Down
2 changes: 1 addition & 1 deletion tests/DBSetupTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
use Illuminate\Support\Facades\DB;
use LibreNMS\DB\Schema;

class DBSetupTest extends DBTestCase
final class DBSetupTest extends DBTestCase
{
protected $db_name;
protected $connection = 'testing';
Expand Down
2 changes: 1 addition & 1 deletion tests/DocsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use PHPUnit\Framework\Attributes\Group;
use Symfony\Component\Yaml\Yaml;

class DocsTest extends TestCase
final class DocsTest extends TestCase
{
private $hidden_pages = [
];
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/Commands/TestConfigCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use App\Facades\LibrenmsConfig;
use LibreNMS\Tests\InMemoryDbTestCase;

class TestConfigCommands extends InMemoryDbTestCase
final class TestConfigCommands extends InMemoryDbTestCase
{
public function testSetting(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace LibreNMS\Tests\Feature\SnmpTraps;

class AdvaAccThresholdCrossingAlertTest extends SnmpTrapTestCase
final class AdvaAccThresholdCrossingAlertTest extends SnmpTrapTestCase
{
public function testAccThresholdTrap(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaAttributeChangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace LibreNMS\Tests\Feature\SnmpTraps;

class AdvaAttributeChangeTest extends SnmpTrapTestCase
final class AdvaAttributeChangeTest extends SnmpTrapTestCase
{
public function testSyslogIPVersionModified(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaDyingGaspTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

use LibreNMS\Enum\Severity;

class AdvaDyingGaspTrapTest extends SnmpTrapTestCase
final class AdvaDyingGaspTrapTest extends SnmpTrapTestCase
{
public function testDyingGasp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace LibreNMS\Tests\Feature\SnmpTraps;

class AdvaNetThresholdCrossingAlertTest extends SnmpTrapTestCase
final class AdvaNetThresholdCrossingAlertTest extends SnmpTrapTestCase
{
public function testNetThresholdTrap(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaNetworkElementAlmTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

use LibreNMS\Enum\Severity;

class AdvaNetworkElementAlmTrapTest extends SnmpTrapTestCase
final class AdvaNetworkElementAlmTrapTest extends SnmpTrapTestCase
{
public function testElementAlarmCleared(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaObjectCreationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace LibreNMS\Tests\Feature\SnmpTraps;

class AdvaObjectCreationTest extends SnmpTrapTestCase
final class AdvaObjectCreationTest extends SnmpTrapTestCase
{
public function testUserCreation(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaObjectDeletionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace LibreNMS\Tests\Feature\SnmpTraps;

class AdvaObjectDeletionTest extends SnmpTrapTestCase
final class AdvaObjectDeletionTest extends SnmpTrapTestCase
{
public function testUserDeletion(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaStateChangeTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

namespace LibreNMS\Tests\Feature\SnmpTraps;

class AdvaStateChangeTrapTest extends SnmpTrapTestCase
final class AdvaStateChangeTrapTest extends SnmpTrapTestCase
{
public function testAccessPortChg(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AdvaSysAlmTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

use LibreNMS\Enum\Severity;

class AdvaSysAlmTrapTest extends SnmpTrapTestCase
final class AdvaSysAlmTrapTest extends SnmpTrapTestCase
{
public function testCriticalAlarm(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/ApcOnBatteryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

use LibreNMS\Enum\Severity;

class ApcOnBatteryTest extends SnmpTrapTestCase
final class ApcOnBatteryTest extends SnmpTrapTestCase
{
/**
* Test ApcOnBattery handle
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/ApcPduOutletTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

use LibreNMS\Enum\Severity;

class ApcPduOutletTest extends SnmpTrapTestCase
final class ApcPduOutletTest extends SnmpTrapTestCase
{
public function testOutletOff(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/ApcPduOverloadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

use LibreNMS\Enum\Severity;

class ApcPduOverloadTest extends SnmpTrapTestCase
final class ApcPduOverloadTest extends SnmpTrapTestCase
{
/**
* Test ApcPduNearOverload trap handle
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/ApcPowerRestoredTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

use LibreNMS\Enum\Severity;

class ApcPowerRestoredTest extends SnmpTrapTestCase
final class ApcPowerRestoredTest extends SnmpTrapTestCase
{
/**
* Test ApcPowerRestored handle
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/ApcSmartAvrReducingOffTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

use LibreNMS\Enum\Severity;

class ApcSmartAvrReducingOffTest extends SnmpTrapTestCase
final class ApcSmartAvrReducingOffTest extends SnmpTrapTestCase
{
/**
* Test ApcSmartAvrReducingOff handle
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/ApcSmartAvrReducingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

use LibreNMS\Enum\Severity;

class ApcSmartAvrReducingTest extends SnmpTrapTestCase
final class ApcSmartAvrReducingTest extends SnmpTrapTestCase
{
/**
* Test ApcSmartAvrReducing handle
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/AxisVideoTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use LibreNMS\Enum\Severity;

class AxisVideoTrapTest extends SnmpTrapTestCase
final class AxisVideoTrapTest extends SnmpTrapTestCase
{
/**
* Test Axis Video trap handlers
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/BgpTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use LibreNMS\Tests\Traits\RequiresDatabase;
use LibreNMS\Util\AutonomousSystem;

class BgpTrapTest extends SnmpTrapTestCase
final class BgpTrapTest extends SnmpTrapTestCase
{
use RequiresDatabase;
use DatabaseTransactions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

use LibreNMS\Enum\Severity;

class CienaCesAAAUserAuthenticationEventTest extends SnmpTrapTestCase
final class CienaCesAAAUserAuthenticationEventTest extends SnmpTrapTestCase
{
public function testAuthSuccess(): void
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Feature/SnmpTraps/CienaCesPortNotificationTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
use LibreNMS\Enum\Severity;
use LibreNMS\Tests\Traits\RequiresDatabase;

class CienaCesPortNotificationTrapTest extends SnmpTrapTestCase
final class CienaCesPortNotificationTrapTest extends SnmpTrapTestCase
{
use RequiresDatabase;
use DatabaseTransactions;

public function testCienaCesPortDownNotification()
public function testCienaCesPortDownNotification(): void
{
// make a device and associate a port with it
$device = Device::factory()->create(); /** @var Device $device */
Expand Down Expand Up @@ -69,7 +69,7 @@ public function testCienaCesPortDownNotification()
$this->assertEquals($port->ifOperStatus, 'down');
}

public function testCienaCesPortUpNotification()
public function testCienaCesPortUpNotification(): void
{
// make a device and associate a port with it
$device = Device::factory()->create(); /** @var Device $device */
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CiscoDHCPServerTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use LibreNMS\Enum\Severity;

class CiscoDHCPServerTrapTest extends SnmpTrapTestCase
final class CiscoDHCPServerTrapTest extends SnmpTrapTestCase
{
/**
* Test CiscoDHCPServer trap handles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
use LibreNMS\Enum\Severity;
use LibreNMS\Tests\Traits\RequiresDatabase;

class CiscoErrDisableInterfaceEventTest extends SnmpTrapTestCase
final class CiscoErrDisableInterfaceEventTest extends SnmpTrapTestCase
{
use RequiresDatabase;
use DatabaseTransactions;
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CiscoLdpSesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use LibreNMS\Enum\Severity;
use LibreNMS\Tests\Traits\RequiresDatabase;

class CiscoLdpSesTest extends SnmpTrapTestCase
final class CiscoLdpSesTest extends SnmpTrapTestCase
{
use RequiresDatabase;
use DatabaseTransactions;
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CiscoMacViolationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

use LibreNMS\Enum\Severity;

class CiscoMacViolationTest extends SnmpTrapTestCase
final class CiscoMacViolationTest extends SnmpTrapTestCase
{
/**
* Test CiscoMacViolation trap handle
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CiscoNSTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use LibreNMS\Enum\Severity;

class CiscoNSTrapTest extends SnmpTrapTestCase
final class CiscoNSTrapTest extends SnmpTrapTestCase
{
/**
* Test Axis Video trap handlers
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CommonTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
use LibreNMS\Tests\Traits\RequiresDatabase;
use Log;

class CommonTrapTest extends SnmpTrapTestCase
final class CommonTrapTest extends SnmpTrapTestCase
{
use RequiresDatabase;
use DatabaseTransactions;
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CppmServiceRestartTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

use LibreNMS\Enum\Severity;

class CppmServiceRestartTrapTest extends SnmpTrapTestCase
final class CppmServiceRestartTrapTest extends SnmpTrapTestCase
{
public function testServiceRestart(): void
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/SnmpTraps/CppmServiceStartTrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

use LibreNMS\Enum\Severity;

class CppmServiceStartTrapTest extends SnmpTrapTestCase
final class CppmServiceStartTrapTest extends SnmpTrapTestCase
{
public function testServiceStart(): void
{
Expand Down
Loading