public function setUp() { $urlFinderFactory = new UrlFinderFactory(); $hostnameFinderFactory = new HostnameFinderFactory(); $urlFinder = $urlFinderFactory->create(); $hostnameFinder = $hostnameFinderFactory->create(); $this->finder = new Entity(array($urlFinder, $hostnameFinder)); }
/** * Initializes context. * * Every scenario gets its own context instance. * You can also pass arbitrary arguments to the * context constructor through behat.yml. */ public function __construct() { $emailAddressFinderFactory = new EmailAddressFinderFactory(); $this->emailAddressFinder = $emailAddressFinderFactory->create(); $numberFinderFactory = new NumberFinderFactory(); $this->numberFinder = $numberFinderFactory->create(); $hostnameFinderFactory = new HostnameFinderFactory(); $this->hostnameFinder = $hostnameFinderFactory->create(); $abbreviationFinderFactory = new AbbreviationFinderFactory(); $this->abbreviationFinder = $abbreviationFinderFactory->create(); $urlFinderFactory = new UrlFinderFactory(); $this->urlFinder = $urlFinderFactory->create(); }
public function __construct(array $abbreviations = array()) { $factory = new UrlFinderFactory(); $this->finder = $factory->create(); }