@@ -57,9 +57,9 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | // optimize autoloader with custom path |
| 59 | 59 | return $this->taskComposerInstall() |
| 60 | - ->preferDist() |
|
| 61 | - ->optimizeAutoloader() |
|
| 62 | - ->run(); |
|
| 60 | + ->preferDist() |
|
| 61 | + ->optimizeAutoloader() |
|
| 62 | + ->run(); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -71,9 +71,9 @@ discard block |
||
| 71 | 71 | { |
| 72 | 72 | // optimize autoloader with custom path |
| 73 | 73 | return $this->taskComposerUpdate() |
| 74 | - ->preferDist() |
|
| 75 | - ->optimizeAutoloader() |
|
| 76 | - ->run(); |
|
| 74 | + ->preferDist() |
|
| 75 | + ->optimizeAutoloader() |
|
| 76 | + ->run(); |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -94,10 +94,10 @@ discard block |
||
| 94 | 94 | public function prepare() |
| 95 | 95 | { |
| 96 | 96 | return $this->taskFileSystemStack() |
| 97 | - ->mkdir($this->properties['dist.dir']) |
|
| 98 | - ->mkdir($this->properties['target.dir']) |
|
| 99 | - ->mkdir(sprintf('%s/reports', $this->properties['target.dir'])) |
|
| 100 | - ->run(); |
|
| 97 | + ->mkdir($this->properties['dist.dir']) |
|
| 98 | + ->mkdir($this->properties['target.dir']) |
|
| 99 | + ->mkdir(sprintf('%s/reports', $this->properties['target.dir'])) |
|
| 100 | + ->run(); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
@@ -167,8 +167,8 @@ discard block |
||
| 167 | 167 | |
| 168 | 168 | // run PHPUnit |
| 169 | 169 | return $this->taskPHPUnit(sprintf('%s/bin/phpunit', $this->properties['vendor.dir'])) |
| 170 | - ->configFile('phpunit.xml') |
|
| 171 | - ->run(); |
|
| 170 | + ->configFile('phpunit.xml') |
|
| 171 | + ->run(); |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /** |
@@ -64,8 +64,8 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | // mock the attribute bunch processor |
| 66 | 66 | $this->mockBunchProcessor = $this->getMockBuilder('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface') |
| 67 | - ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 68 | - ->getMock(); |
|
| 67 | + ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 68 | + ->getMock(); |
|
| 69 | 69 | |
| 70 | 70 | // the observer instance we want to test |
| 71 | 71 | $this->observer = new CatalogAttributeObserver($this->mockBunchProcessor); |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | array(ColumnKeys::IS_FILTERABLE_IN_GRID), |
| 119 | 119 | array(ColumnKeys::SEARCH_WEIGHT), |
| 120 | 120 | array(ColumnKeys::ADDITIONAL_DATA) |
| 121 | - ) |
|
| 121 | + ) |
|
| 122 | 122 | ->willReturnOnConsecutiveCalls( |
| 123 | 123 | true, |
| 124 | 124 | false, |
@@ -165,13 +165,13 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | // mock the method that persists the entity |
| 167 | 167 | $this->mockBunchProcessor->expects($this->once()) |
| 168 | - ->method('persistCatalogAttribute') |
|
| 169 | - ->with($expectedEntity) |
|
| 170 | - ->willReturn(null); |
|
| 168 | + ->method('persistCatalogAttribute') |
|
| 169 | + ->with($expectedEntity) |
|
| 170 | + ->willReturn(null); |
|
| 171 | 171 | $this->mockBunchProcessor->expects($this->once()) |
| 172 | - ->method('loadRawEntity') |
|
| 173 | - ->with(EntityTypeCodes::CATALOG_EAV_ATTRIBUTE, array(MemberNames::ATTRIBUTE_ID => $lastAttributeId)) |
|
| 174 | - ->willReturn($expectedEntity); |
|
| 172 | + ->method('loadRawEntity') |
|
| 173 | + ->with(EntityTypeCodes::CATALOG_EAV_ATTRIBUTE, array(MemberNames::ATTRIBUTE_ID => $lastAttributeId)) |
|
| 174 | + ->willReturn($expectedEntity); |
|
| 175 | 175 | |
| 176 | 176 | // invoke the handle method |
| 177 | 177 | $this->assertSame($row, $this->observer->handle($mockSubject)); |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | // mock the attribute bunch processor |
| 65 | 65 | $this->mockBunchProcessor = $this->getMockBuilder('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface') |
| 66 | - ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 67 | - ->getMock(); |
|
| 66 | + ->setMethods(get_class_methods('TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface')) |
|
| 67 | + ->getMock(); |
|
| 68 | 68 | |
| 69 | 69 | // the observer instance we want to test |
| 70 | 70 | $this->observer = new CatalogAttributeUpdateObserver($this->mockBunchProcessor); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | array(ColumnKeys::IS_FILTERABLE_IN_GRID), |
| 118 | 118 | array(ColumnKeys::SEARCH_WEIGHT), |
| 119 | 119 | array(ColumnKeys::ADDITIONAL_DATA) |
| 120 | - ) |
|
| 120 | + ) |
|
| 121 | 121 | ->willReturnOnConsecutiveCalls( |
| 122 | 122 | true, |
| 123 | 123 | false, |
@@ -190,18 +190,18 @@ discard block |
||
| 190 | 190 | |
| 191 | 191 | // mock the method that loads the existing entity |
| 192 | 192 | $this->mockBunchProcessor->expects($this->once()) |
| 193 | - ->method('loadCatalogAttribute') |
|
| 194 | - ->with($lastAttributeId) |
|
| 195 | - ->willReturn($existingEntity); |
|
| 193 | + ->method('loadCatalogAttribute') |
|
| 194 | + ->with($lastAttributeId) |
|
| 195 | + ->willReturn($existingEntity); |
|
| 196 | 196 | // mock the method that persists the entity |
| 197 | 197 | $this->mockBunchProcessor->expects($this->once()) |
| 198 | - ->method('persistCatalogAttribute') |
|
| 199 | - ->with($expectedEntity) |
|
| 200 | - ->willReturn(null); |
|
| 198 | + ->method('persistCatalogAttribute') |
|
| 199 | + ->with($expectedEntity) |
|
| 200 | + ->willReturn(null); |
|
| 201 | 201 | // mock the method that loads the raw entity |
| 202 | 202 | $this->mockBunchProcessor->expects($this->once()) |
| 203 | - ->method('loadRawEntity') |
|
| 204 | - ->willReturnArgument(1); |
|
| 203 | + ->method('loadRawEntity') |
|
| 204 | + ->willReturnArgument(1); |
|
| 205 | 205 | // invoke the handle method |
| 206 | 206 | $this->assertSame($row, $this->observer->handle($mockSubject)); |
| 207 | 207 | } |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | array(ColumnKeys::ADDITIONAL_DATA), |
| 314 | 314 | array(ColumnKeys::ATTRIBUTE_OPTION_VALUES), |
| 315 | 315 | array(ColumnKeys::ATTRIBUTE_OPTION_SWATCH) |
| 316 | - ) |
|
| 316 | + ) |
|
| 317 | 317 | ->willReturnOnConsecutiveCalls( |
| 318 | 318 | 0, |
| 319 | 319 | 1, |
@@ -363,7 +363,7 @@ discard block |
||
| 363 | 363 | 23, |
| 364 | 364 | 7, |
| 365 | 365 | 8 |
| 366 | - ); |
|
| 366 | + ); |
|
| 367 | 367 | $mockSubject->expects($this->once()) |
| 368 | 368 | ->method('hasBeenProcessed') |
| 369 | 369 | ->with($attributeCode) |
@@ -448,18 +448,18 @@ discard block |
||
| 448 | 448 | |
| 449 | 449 | // mock the method that loads the existing entity |
| 450 | 450 | $this->mockBunchProcessor->expects($this->once()) |
| 451 | - ->method('loadCatalogAttribute') |
|
| 452 | - ->with($lastAttributeId) |
|
| 453 | - ->willReturn($existingEntity); |
|
| 451 | + ->method('loadCatalogAttribute') |
|
| 452 | + ->with($lastAttributeId) |
|
| 453 | + ->willReturn($existingEntity); |
|
| 454 | 454 | // mock the method that persists the entity |
| 455 | 455 | $this->mockBunchProcessor->expects($this->once()) |
| 456 | - ->method('persistCatalogAttribute') |
|
| 457 | - ->with($expectedEntity) |
|
| 458 | - ->willReturn(null); |
|
| 456 | + ->method('persistCatalogAttribute') |
|
| 457 | + ->with($expectedEntity) |
|
| 458 | + ->willReturn(null); |
|
| 459 | 459 | // mock the method that loads the raw entity |
| 460 | 460 | $this->mockBunchProcessor->expects($this->once()) |
| 461 | - ->method('loadRawEntity') |
|
| 462 | - ->willReturnArgument(1); |
|
| 461 | + ->method('loadRawEntity') |
|
| 462 | + ->willReturnArgument(1); |
|
| 463 | 463 | |
| 464 | 464 | // invoke the handle method |
| 465 | 465 | $this->assertSame($row, $this->observer->handle($mockSubject)); |
@@ -57,14 +57,14 @@ |
||
| 57 | 57 | |
| 58 | 58 | // add debug log entry |
| 59 | 59 | $this->getSubject() |
| 60 | - ->getSystemLogger() |
|
| 61 | - ->debug( |
|
| 62 | - sprintf( |
|
| 63 | - 'Successfully copied image %s for swatch with id %s', |
|
| 64 | - $imagePath, |
|
| 65 | - $attributeOptionSwatch[MemberNames::SWATCH_ID] |
|
| 66 | - ) |
|
| 67 | - ); |
|
| 60 | + ->getSystemLogger() |
|
| 61 | + ->debug( |
|
| 62 | + sprintf( |
|
| 63 | + 'Successfully copied image %s for swatch with id %s', |
|
| 64 | + $imagePath, |
|
| 65 | + $attributeOptionSwatch[MemberNames::SWATCH_ID] |
|
| 66 | + ) |
|
| 67 | + ); |
|
| 68 | 68 | } |
| 69 | 69 | } |
| 70 | 70 | } |