/** * Returns an array of fieldName => Faker class * * @return array */ public function getColsNameMapping() { $origMapping = parent::getColsNameMapping(); $newMapping = array('.*\\..*url' => array('method' => 'url'), '.*\\.(facebook|twitter|googleplus|website|server_url)' => array('method' => 'url'), '.*\\.(annual_revenue|employees)' => array('method' => 'randomNumber', 'params' => array(4)), '.*\\.(is_template|invalid_email|opt_out|from_addr|reply_to_addr|from_address|to_addrs|cc_addrs|bcc_addrs)' => array('method' => 'boolean'), '.*\\.email_address_caps' => array('method' => 'email'), 'accounts.name' => array('method' => 'company'), 'teams.name' => array('method' => 'domainWord'), 'teams.name_2' => array('method' => 'domainWord'), 'users.user_name' => array('method' => 'userName')); $newMapping = array_merge($newMapping, $this->extraColsNameMapping); return array_merge($origMapping, $newMapping); }
/** * @expectedException Inet\Neuralyzer\Exception\InetAnonGuesserException */ public function testMapColWrongType() { $guesser = new Guesser(); $guesser->mapCol('test', 'nothingtocompare', 'nothingtocompare', '255'); }