Skip to content

Commit 5c0580a

Browse files
committed
Fix PSR-2 test
1 parent 043ab1e commit 5c0580a

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test:
2+
vendor/bin/phpunit --coverage-text
3+
vendor/bin/phpcs --version && echo && vendor/bin/phpcs -p --standard=PSR2 --ignore=src/lang/,src/views/ src tests

src/LfmPath.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ private function uploadValidator($file)
279279

280280
private function getNewName($file)
281281
{
282-
$new_file_name = $this->helper->translateFromUtf8(trim(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME)));
282+
$new_file_name = $this->helper
283+
->translateFromUtf8(trim(pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME)));
283284

284285
if (config('lfm.rename_file') === true) {
285286
$new_file_name = uniqid();

tests/LfmItemTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function tearDown()
2828
parent::tearDown();
2929
}
3030

31-
public function test__Get()
31+
public function testMagicGet()
3232
{
3333
$this->lfm_item = new LfmItem($this->lfm_path, m::mock(Lfm::class));
3434

tests/LfmPathTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function tearDown()
1818
parent::tearDown();
1919
}
2020

21-
public function test__Get()
21+
public function testMagicGet()
2222
{
2323
$storage = m::mock(LfmStorage::class);
2424

@@ -34,7 +34,7 @@ public function test__Get()
3434
$this->assertEquals($storage, $path->storage);
3535
}
3636

37-
public function test__Call()
37+
public function testMagicCall()
3838
{
3939
$storage = m::mock(LfmStorage::class);
4040
$storage->shouldReceive('foo')->andReturn('bar');

tests/LfmStorageRepositoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function tearDown()
3838
m::close();
3939
}
4040

41-
public function test__Call()
41+
public function testMagicCall()
4242
{
4343
$this->assertEquals('baz', $this->storage->functionToCall());
4444
}

0 commit comments

Comments
 (0)