@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $file = m::mock(FileNodeInterface::class); |
210 | 210 | $file->shouldReceive('__toString') |
211 | - ->andReturn('some/file/here'); |
|
211 | + ->andReturn('some/file/here'); |
|
212 | 212 | |
213 | 213 | $this->expectException(InvalidArgumentException::class); |
214 | 214 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $process = m::mock(Process::class)->makePartial(); |
221 | 221 | $process->shouldReceive('isSuccessful')->andReturn(false); |
222 | 222 | $this->processFactory->shouldReceive('createProcess') |
223 | - ->andReturn($process); |
|
223 | + ->andReturn($process); |
|
224 | 224 | |
225 | 225 | $file = new LocalFile(static::$dir . 'failed_tail.test'); |
226 | 226 | $file->put('nothing interesting here'); |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | { |
25 | 25 | $file = m::mock(FileNode::class); |
26 | 26 | $file->shouldReceive('getMetadata') |
27 | - ->andReturn([ |
|
28 | - 'name' => 'test', |
|
29 | - ]); |
|
27 | + ->andReturn([ |
|
28 | + 'name' => 'test', |
|
29 | + ]); |
|
30 | 30 | $collection = new FileNodeCollection(); |
31 | 31 | $collection->add($file); |
32 | 32 | |
@@ -41,14 +41,14 @@ discard block |
||
41 | 41 | { |
42 | 42 | $file = m::mock(FileNode::class); |
43 | 43 | $file->shouldReceive('getMetadata') |
44 | - ->andReturn([ |
|
45 | - 'name' => 'test', |
|
46 | - ]); |
|
44 | + ->andReturn([ |
|
45 | + 'name' => 'test', |
|
46 | + ]); |
|
47 | 47 | $file2 = m::mock(FileNode::class); |
48 | 48 | $file2->shouldReceive('getMetadata') |
49 | - ->andReturn([ |
|
50 | - 'name' => 'test2', |
|
51 | - ]); |
|
49 | + ->andReturn([ |
|
50 | + 'name' => 'test2', |
|
51 | + ]); |
|
52 | 52 | $collection = new FileNodeCollection(); |
53 | 53 | $collection->add($file); |
54 | 54 | $collection->add($file2); |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | { |
68 | 68 | $file = m::mock(FileNode::class); |
69 | 69 | $file->shouldReceive('getMetadata') |
70 | - ->andReturn(false); |
|
70 | + ->andReturn(false); |
|
71 | 71 | $collection = new FileNodeCollection(); |
72 | 72 | $collection->add($file); |
73 | 73 |
@@ -31,8 +31,8 @@ |
||
31 | 31 | $this->logger->setLogger($logger); |
32 | 32 | |
33 | 33 | $logger->shouldReceive('log') |
34 | - ->with(LogLevel::INFO, 'Graze\DataFile\Test\Helper\FakeOptionalLogger: some text', []) |
|
35 | - ->once(); |
|
34 | + ->with(LogLevel::INFO, 'Graze\DataFile\Test\Helper\FakeOptionalLogger: some text', []) |
|
35 | + ->once(); |
|
36 | 36 | |
37 | 37 | $this->logger->doLog('some text'); |
38 | 38 | } |
@@ -5,8 +5,8 @@ |
||
5 | 5 | use Graze\DataFile\Test\Helper\FakeOptionalLogger; |
6 | 6 | use Graze\DataFile\Test\TestCase; |
7 | 7 | use Mockery as m; |
8 | -use Psr\Log\LoggerInterface; |
|
9 | 8 | use Psr\Log\LogLevel; |
9 | +use Psr\Log\LoggerInterface; |
|
10 | 10 | |
11 | 11 | class OptionalLoggerTraitTest extends TestCase |
12 | 12 | { |
@@ -17,8 +17,8 @@ |
||
17 | 17 | $directory = new FileNode($fileSystem, 'random/path'); |
18 | 18 | |
19 | 19 | $fileSystem->shouldReceive('createDir') |
20 | - ->with($directory->getDirectory(), ['visibility' => 'public']) |
|
21 | - ->andReturn(false); |
|
20 | + ->with($directory->getDirectory(), ['visibility' => 'public']) |
|
21 | + ->andReturn(false); |
|
22 | 22 | $this->expectException(MakedirectoryFailedException::class); |
23 | 23 | |
24 | 24 | $maker = new MakeDirectory(); |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Graze\DataFile\Test\Unit\Modify; |
4 | 4 | |
5 | -use Graze\DataFile\Modify\Exception\MakeDirectoryFailedException; |
|
6 | 5 | use Graze\DataFile\Modify\MakeDirectory; |
7 | 6 | use Graze\DataFile\Node\FileNode; |
8 | 7 | use Graze\DataFile\Test\TestCase; |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $outputFilePath = $pathInfo['dirname'] . '/' . $outputFileName; |
89 | 89 | |
90 | 90 | $output = $file->getClone() |
91 | - ->setPath($outputFilePath); |
|
91 | + ->setPath($outputFilePath); |
|
92 | 92 | |
93 | 93 | $this->log(LogLevel::INFO, "Retrieving the last {lines} from file {file}", [ |
94 | 94 | 'lines' => $this->lines, |
@@ -88,7 +88,7 @@ |
||
88 | 88 | $outputFilePath = $pathInfo['dirname'] . '/' . $outputFileName; |
89 | 89 | |
90 | 90 | $output = $file->getClone() |
91 | - ->setPath($outputFilePath); |
|
91 | + ->setPath($outputFilePath); |
|
92 | 92 | |
93 | 93 | $this->log(LogLevel::INFO, "Retrieving the last {lines} from file {file}", [ |
94 | 94 | 'lines' => $this->lines, |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $file = m::mock(FileNodeInterface::class); |
210 | 210 | $file->shouldReceive('__toString') |
211 | - ->andReturn('some/file/here'); |
|
211 | + ->andReturn('some/file/here'); |
|
212 | 212 | |
213 | 213 | $this->expectException(InvalidArgumentException::class); |
214 | 214 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $process = m::mock(Process::class)->makePartial(); |
221 | 221 | $process->shouldReceive('isSuccessful')->andReturn(false); |
222 | 222 | $this->processFactory->shouldReceive('createProcess') |
223 | - ->andReturn($process); |
|
223 | + ->andReturn($process); |
|
224 | 224 | |
225 | 225 | $file = new LocalFile(static::$dir . 'failed_tail.test'); |
226 | 226 | $file->put('nothing interesting here'); |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | { |
209 | 209 | $file = m::mock(FileNodeInterface::class); |
210 | 210 | $file->shouldReceive('__toString') |
211 | - ->andReturn('some/file/here'); |
|
211 | + ->andReturn('some/file/here'); |
|
212 | 212 | |
213 | 213 | $this->expectException(InvalidArgumentException::class); |
214 | 214 | |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $process = m::mock(Process::class)->makePartial(); |
221 | 221 | $process->shouldReceive('isSuccessful')->andReturn(false); |
222 | 222 | $this->processFactory->shouldReceive('createProcess') |
223 | - ->andReturn($process); |
|
223 | + ->andReturn($process); |
|
224 | 224 | |
225 | 225 | $file = new LocalFile(static::$dir . 'failed_tail.test'); |
226 | 226 | $file->put('nothing interesting here'); |
@@ -25,8 +25,8 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | $outputFile = $node->getClone() |
28 | - ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename'] . '.' . $this->getExtension()) |
|
29 | - ->setCompression($this->getName()); |
|
28 | + ->setPath($pathInfo['dirname'] . '/' . $pathInfo['filename'] . '.' . $this->getExtension()) |
|
29 | + ->setCompression($this->getName()); |
|
30 | 30 | |
31 | 31 | $this->log(LogLevel::INFO, "Compressing file: {file} into {target} using {compression}", [ |
32 | 32 | 'file' => $node, |