diff --git a/tests/Unit/Admin/Product/Attributes/Input/AttributeInputCollectionTest.php b/tests/Unit/Admin/Product/Attributes/Input/AttributeInputCollectionTest.php index f6a9438e37..d4ab220b8e 100644 --- a/tests/Unit/Admin/Product/Attributes/Input/AttributeInputCollectionTest.php +++ b/tests/Unit/Admin/Product/Attributes/Input/AttributeInputCollectionTest.php @@ -56,7 +56,7 @@ class AttributeInputCollectionTest extends UnitTest { */ public function setUp(): void { parent::setUp(); - $this->options = $this->createMock( OptionsInterface::class ); + $this->options = $this->createMock( OptionsInterface::class ); } public function test_adult_input() { diff --git a/tests/Unit/Jobs/MigrateGTINTest.php b/tests/Unit/Jobs/MigrateGTINTest.php index 3f0f15dca5..d1104a05ba 100644 --- a/tests/Unit/Jobs/MigrateGTINTest.php +++ b/tests/Unit/Jobs/MigrateGTINTest.php @@ -52,7 +52,7 @@ public function setUp(): void { parent::setUp(); $this->action_scheduler = $this->createMock( ActionScheduler::class ); - $this->options = $this->createMock( OptionsInterface::class ); + $this->options = $this->createMock( OptionsInterface::class ); $this->monitor = $this->createMock( ActionSchedulerJobMonitor::class ); $this->product_repository = $this->createMock( ProductRepository::class ); $this->attribute_manager = $this->createMock( AttributeManager::class ); @@ -87,14 +87,14 @@ public function test_job_name() { public function test_schedule_updates_status_to_started() { $this->options->expects( $this->exactly( 1 ) ) ->method( 'update' ) - ->with( OptionsInterface::GTIN_MIGRATION_STATUS, MigrateGTIN::GTIN_MIGRATION_STARTED ); + ->with( OptionsInterface::GTIN_MIGRATION_STATUS, MigrateGTIN::GTIN_MIGRATION_STARTED ); $this->job->schedule(); } public function test_completed_job_updates_status_to_completed() { $this->options->expects( $this->exactly( 1 ) ) ->method( 'update' ) - ->with( OptionsInterface::GTIN_MIGRATION_STATUS, MigrateGTIN::GTIN_MIGRATION_COMPLETED ); + ->with( OptionsInterface::GTIN_MIGRATION_STATUS, MigrateGTIN::GTIN_MIGRATION_COMPLETED ); $this->job->handle_complete( 2 ); } @@ -103,7 +103,6 @@ public function test_single_empty_batch() { ->method( 'find_all_product_ids' ) ->willReturn( [] ); - $this->action_scheduler->expects( $this->once() ) ->method( 'has_scheduled_action' )->willReturn( false ); @@ -123,7 +122,6 @@ public function test_single_batch() { ->method( 'find_all_product_ids' ) ->willReturn( $batch ); - $this->action_scheduler->expects( $this->exactly( 3 ) ) ->method( 'has_scheduled_action' )->willReturn( false ); @@ -176,7 +174,6 @@ public function test_process_item_is_called_by_hook() { ->method( 'find_by_ids' ) ->with( [ 1 ] ); - do_action( self::PROCESS_ITEM_HOOK, [ 1 ] ); } @@ -186,7 +183,7 @@ public function test_process_items_sucessfully_updates_gtin() { ->expects( $this->once() ) ->method( 'find_by_ids' ) ->with( [ 1 ] ) - ->willReturn( [ $product ] ); + ->willReturn( [ $product ] ); $this->attribute_manager ->expects( $this->once() ) @@ -194,7 +191,7 @@ public function test_process_items_sucessfully_updates_gtin() { ->with( $product, 'gtin' ) ->willReturn( '1234-5678' ); - $this->assertEquals( $product->get_global_unique_id(), null ); + $this->assertEquals( $product->get_global_unique_id(), null ); $this->job->handle_process_items_action( [ 1 ] ); $this->assertEquals( $product->get_global_unique_id(), '12345678' ); } @@ -261,5 +258,4 @@ public function test_process_items_not_updates_gtin_if_not_a_number() { $this->job->handle_process_items_action( [ 1 ] ); $this->assertEquals( $product->get_global_unique_id(), null ); } - }