100, 'get_name' => 'Test Product', 'get_type' => 'simple', 'get_price' => '10.00', 'get_regular_price' => '10.00', 'get_price_html' => '$10.00', 'get_permalink' => 'https://example.com/product/test', 'get_image_id' => 1, 'get_stock_quantity' => null, 'get_stock_status' => 'instock', 'is_purchasable' => true, 'is_in_stock' => true, 'managing_stock' => false, 'backorders_allowed' => false, ]; $config = array_merge($defaults, $overrides); $mock = \Mockery::mock('WC_Product'); foreach ($config as $method => $return) { $mock->shouldReceive($method)->andReturn($return)->byDefault(); } return $mock; } }