public function testGetCustomerTaxClassId() { $groupId = 1; $taxClassId = 1; $customerGroupMock = $this->getMockBuilder('Magento\\Customer\\Service\\V1\\Data\\CustomerGroup')->disableOriginalConstructor()->getMock(); $customerGroupMock->expects($this->once())->method('getTaxClassId')->will($this->returnValue($taxClassId)); $this->customerGroupServiceMock->expects($this->once())->method('getGroup')->with($groupId)->will($this->returnValue($customerGroupMock)); $this->quote->setData('customer_group_id', $groupId); $result = $this->quote->getCustomerTaxClassId(); $this->assertEquals($taxClassId, $result); }