]> git.mxchange.org Git - friendica.git/commitdiff
Adjust testModuleClass() expectations after introducing lastRoutesFileModifiedTime...
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 15 Oct 2020 16:41:49 +0000 (12:41 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 15 Oct 2020 16:41:49 +0000 (12:41 -0400)
tests/src/App/ModuleTest.php
tests/src/App/RouterTest.php

index 03bb14b605c4770b61fa8e7911d6e0e1829cbd9f..be49a741aaadfea6fda2d2f13737f59548ae9954 100644 (file)
@@ -178,7 +178,8 @@ class ModuleTest extends DatabaseTest
 
                $cache = \Mockery::mock(ICache::class);
                $cache->shouldReceive('get')->with('routerDispatchData')->andReturn('')->atMost()->once();
-               $cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->once();
+               $cache->shouldReceive('get')->with('lastRoutesFileModifiedTime')->andReturn('')->atMost()->once();
+               $cache->shouldReceive('set')->withAnyArgs()->andReturn(false)->atMost()->twice();
 
                $router = (new App\Router([], __DIR__ . '/../../../static/routes.config.php', $l10n, $cache));
 
index df1ea5e9ad241a989c12d17d8975ee2ef3f9d22a..b9c23a2b234e1e7806b660d850a2319fdcddbb9a 100644 (file)
@@ -185,7 +185,7 @@ class RouterTest extends TestCase
                                                ],
                                        ],
                                        '/post' => [
-                                               '/it' => [Module\NodeInfo::class, [Router::POST]],
+                                               '/it' => [Module\WellKnown\NodeInfo::class, [Router::POST]],
                                        ],
                                        '/double' => [Module\Profile\Index::class, [Router::GET, Router::POST]]
                                ],
@@ -221,7 +221,7 @@ class RouterTest extends TestCase
                ], '', $this->l10n, $this->cache))->loadRoutes($routes);
 
                // Don't find GET
-               $this->assertEquals(Module\NodeInfo::class, $router->getModuleClass('/post/it'));
+               $this->assertEquals(Module\WellKnown\NodeInfo::class, $router->getModuleClass('/post/it'));
                $this->assertEquals(Module\Profile\Index::class, $router->getModuleClass('/double'));
        }
 }