/** * @return array */ protected function getExtensions() { $account = $this->getAccount(1); $user = new AccountUser(); $user->setAccount($account); $this->securityFacade->expects($this->any())->method('getLoggedUser')->willReturn($user); $frontendUserRoleSelectType = new EntitySelectTypeStub($this->getRoles(), FrontendAccountUserRoleSelectType::NAME, new AccountUserRoleSelectType()); $addressEntityType = new EntityType($this->getAddresses(), 'test_address_entity'); $accountSelectType = new AccountSelectTypeStub($this->getAccounts(), 'orob2b_account_select'); $accountUserType = new AccountUserType($this->securityFacade); $accountUserType->setDataClass(self::DATA_CLASS); $accountUserType->setAddressClass(self::ADDRESS_CLASS); return [new PreloadedExtension([OroDateType::NAME => new OroDateType(), AccountUserType::NAME => $accountUserType, FrontendAccountUserRoleSelectType::NAME => $frontendUserRoleSelectType, $accountSelectType->getName() => $accountSelectType, AddressCollectionTypeStub::NAME => new AddressCollectionTypeStub(), $addressEntityType->getName() => $addressEntityType], []), new ValidatorExtension(Validation::createValidator())]; }
/** * Test getName */ public function testGetName() { $this->assertEquals(AccountUserType::NAME, $this->formType->getName()); }