| @@ 65-75 (lines=11) @@ | ||
| 62 | * @return void |
|
| 63 | * @see \PHPUnit\Framework\TestCase::setUp() |
|
| 64 | */ |
|
| 65 | protected function setUp() |
|
| 66 | { |
|
| 67 | ||
| 68 | // initialize a mock processor instance |
|
| 69 | $this->mockProductUrlRewriteProcessor = $this->getMockBuilder('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface') |
|
| 70 | ->setMethods(get_class_methods('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface')) |
|
| 71 | ->getMock(); |
|
| 72 | ||
| 73 | // initialize the observer |
|
| 74 | $this->observer = new UrlRewriteUpdateObserver($this->mockProductUrlRewriteProcessor); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * Test's the handle() method with a successfull URL rewrite persist when using different categories. |
|
| @@ 66-76 (lines=11) @@ | ||
| 63 | * @return void |
|
| 64 | * @see \PHPUnit\Framework\TestCase::setUp() |
|
| 65 | */ |
|
| 66 | protected function setUp() |
|
| 67 | { |
|
| 68 | ||
| 69 | // initialize a mock processor instance |
|
| 70 | $this->mockProductUrlRewriteProcessor = $this->getMockBuilder('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface') |
|
| 71 | ->setMethods(get_class_methods('TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface')) |
|
| 72 | ->getMock(); |
|
| 73 | ||
| 74 | // initialize the observer |
|
| 75 | $this->observer = new UrlRewriteObserver($this->mockProductUrlRewriteProcessor); |
|
| 76 | } |
|
| 77 | ||
| 78 | protected function createAndInvokeObserver($generateCategoryProductRewrites = true, $productCategoryIds = [], $category = []) |
|
| 79 | { |
|