diff options
Diffstat (limited to 'tests/lib/NavigationManagerTest.php')
-rw-r--r-- | tests/lib/NavigationManagerTest.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index dbc3b0419c7..53d7e81302b 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -41,7 +41,7 @@ class NavigationManagerTest extends TestCase { protected IEVentDispatcher|MockObject $dispatcher; - /** @var \OC\NavigationManager */ + /** @var NavigationManager */ protected $navigationManager; protected LoggerInterface $logger; @@ -122,11 +122,11 @@ class NavigationManagerTest extends TestCase { } /** - * @dataProvider addArrayData * * @param array $entry * @param array $expectedEntry */ + #[\PHPUnit\Framework\Attributes\DataProvider('addArrayData')] public function testAddArray(array $entry, array $expectedEntry): void { $this->assertEmpty($this->navigationManager->getAll('all'), 'Expected no navigation entry exists'); $this->navigationManager->add($entry); @@ -140,11 +140,11 @@ class NavigationManagerTest extends TestCase { } /** - * @dataProvider addArrayData * * @param array $entry * @param array $expectedEntry */ + #[\PHPUnit\Framework\Attributes\DataProvider('addArrayData')] public function testAddClosure(array $entry, array $expectedEntry): void { global $testAddClosureNumberOfCalls; $testAddClosureNumberOfCalls = 0; @@ -215,9 +215,7 @@ class NavigationManagerTest extends TestCase { $this->assertEquals(0, $testAddClosureNumberOfCalls, 'Expected that the closure is not called by getAll()'); } - /** - * @dataProvider providesNavigationConfig - */ + #[\PHPUnit\Framework\Attributes\DataProvider('providesNavigationConfig')] public function testWithAppManager($expected, $navigation, $isAdmin = false): void { $l = $this->createMock(IL10N::class); $l->expects($this->any())->method('t')->willReturnCallback(function ($text, $parameters = []) { @@ -731,9 +729,7 @@ class NavigationManagerTest extends TestCase { ]; } - /** - * @dataProvider provideDefaultEntries - */ + #[\PHPUnit\Framework\Attributes\DataProvider('provideDefaultEntries')] public function testGetDefaultEntryIdForUser(string $defaultApps, string $userDefaultApps, string $userApporder, bool $withFallbacks, string $expectedApp): void { $this->navigationManager->add([ 'id' => 'files', |