/** * Specifies wrapped WebElement. * * @param WebElement $wrapped_element Element to be wrapped. * @param IPageFactory $page_factory Page factory. */ public function __construct(WebElement $wrapped_element, IPageFactory $page_factory) { parent::__construct($wrapped_element); $this->_pageFactory = $page_factory; $this->_pageFactory->initElementContainer($this); $this->_pageFactory->initElements($this, $page_factory->createDecorator($this)); }
public function testGetContainer() { $expected = 'OK'; $this->webElement->shouldReceive('getContainer')->once()->andReturn($expected); $this->assertEquals($expected, $this->typifiedElement->getContainer()); }