]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Core/Lock/SemaphoreLockTest.php
Shorten "Configuration" to "Config" again, since the Wrapper is gone
[friendica.git] / tests / src / Core / Lock / SemaphoreLockTest.php
index 48c3b9f4360c53515f91c5eb725e9fc44106adee..ab4f98c63e75b793e5de9039d8e764a31345439a 100644 (file)
@@ -4,8 +4,8 @@ namespace Friendica\Test\src\Core\Lock;
 
 use Dice\Dice;
 use Friendica\App;
-use Friendica\Core\Config\IConfiguration;
-use Friendica\Core\Config\JitConfiguration;
+use Friendica\Core\Config\IConfig;
+use Friendica\Core\Config\JitConfig;
 use Friendica\Core\Lock\SemaphoreLock;
 use Friendica\DI;
 use Mockery\MockInterface;
@@ -19,14 +19,14 @@ class SemaphoreLockTest extends LockTest
 
                $app = \Mockery::mock(App::class);
                $app->shouldReceive('getHostname')->andReturn('friendica.local');
-               $dice->shouldReceive('create')->with(App::class, [])->andReturn($app);
+               $dice->shouldReceive('create')->with(App::class)->andReturn($app);
 
-               $configMock = \Mockery::mock(JitConfiguration::class);
+               $configMock = \Mockery::mock(JitConfig::class);
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'temppath', NULL, false)
                        ->andReturn('/tmp/');
-               $dice->shouldReceive('create')->with(IConfiguration::class, [])->andReturn($configMock);
+               $dice->shouldReceive('create')->with(IConfig::class)->andReturn($configMock);
 
                // @todo Because "get_temppath()" is using static methods, we have to initialize the BaseObject
                DI::init($dice);
@@ -55,7 +55,7 @@ class SemaphoreLockTest extends LockTest
                touch($file);
 
                $this->assertTrue(file_exists($file));
-               $this->assertFalse($this->instance->releaseLock('test', false));
+               $this->assertFalse($this->instance->release('test', false));
                $this->assertTrue(file_exists($file));
        }
 
@@ -72,7 +72,7 @@ class SemaphoreLockTest extends LockTest
                touch($file);
 
                $this->assertTrue(file_exists($file));
-               $this->assertFalse($this->instance->releaseLock('test', true));
+               $this->assertFalse($this->instance->release('test', true));
                $this->assertTrue(file_exists($file));
        }
 
@@ -87,6 +87,6 @@ class SemaphoreLockTest extends LockTest
                $this->assertTrue(file_exists($file));
                $this->assertTrue($this->instance->acquire('test'));
                $this->assertTrue($this->instance->isLocked('test'));
-               $this->assertTrue($this->instance->releaseLock('test'));
+               $this->assertTrue($this->instance->release('test'));
        }
 }