-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fatal error: Call to a member function open() on null #98
Comments
Sounds weird: are you sure you're not overriding |
The loginPage: <?php
namespace Behat\Page\Security;
use SensioLabs\Behat\PageObjectExtension\PageObject\Page;
class LoginPage extends Page
{
protected $path = 'login';
} |
@nietzscheson could you put a |
It's the result of var_dump($this->loginPage): class ProxyManagerGeneratedProxy\__PM__\Behat\Page\Security\LoginPage\Generated892a68bed1424ff805ea5e5652e59e48#4143 (10) {
│ private $valueHolder59d3b5d715938297741385 =>
│ NULL
│ private $initializer59d3b5d715c36812164521 =>
│ class Closure#3957 (3) {
│ public $static =>
│ array(2) {
│ 'pageObjectClass' =>
│ string(29) "Behat\Page\Security\LoginPage"
│ 'decoratedFactory' =>
│ class SensioLabs\Behat\PageObjectExtension\PageObject\Factory\DefaultFactory#3757 (3) {
│ ...
│ }
│ }
│ public $this =>
│ class SensioLabs\Behat\PageObjectExtension\PageObject\Factory\LazyFactory#3763 (2) {
│ private $decoratedFactory =>
│ class SensioLabs\Behat\PageObjectExtension\PageObject\Factory\DefaultFactory#3757 (3) {
│ ...
│ }
│ private $proxyFactory =>
│ class ProxyManager\Factory\LazyLoadingValueHolderFactory#3759 (3) {
│ ...
│ }
│ }
│ public $parameter =>
│ array(5) {
│ '&$wrappedObject' =>
│ string(10) "<required>"
│ '$proxy' =>
│ string(10) "<required>"
│ '$method' =>
│ string(10) "<required>"
│ '$parameters' =>
│ string(10) "<required>"
│ '&$initializer' =>
│ string(10) "<required>"
│ }
│ }
│ } |
As you can see, |
I'm not sure. I only have those classes |
if modify this line: public function open(array $urlParameters = array())
{
$url = $this->getUrl($urlParameters);
$this->getDriver()->visit($url);
$this->verify($urlParameters);
return $this;
} For this, works: public function open(array $urlParameters = array())
{
$url = $this->getUrl($urlParameters);
$this->getSession()->visit($url);
$this->verify($urlParameters);
return $this;
} It's as if I was not able to resolve the driver to handle the session ... with the session directly, everything is fine ... |
Update the composer with composer update --prefer-stable and works:
behat/behat v3.4.1 Scenario-oriented BDD framework for PHP 5.3
behat/gherkin v4.5.1 Gherkin DSL parser for PHP 5.3
behat/mink dev-master 9ea1ceb Browser controller/emulator abstraction for PHP
behat/mink-browserkit-driver dev-master 1c9c8ad Symfony2 BrowserKit driver for Mink framework
behat/mink-extension v2.2 Mink extension for Behat
behat/mink-selenium2-driver dev-master 46404b0 Selenium2 (WebDriver) driver for Mink framework
behat/symfony2-extension dev-master 319b56c Symfony2 framework extension for Behat New Composer: behat/behat v3.4.1 Scenario-oriented BDD framework for PHP 5.3
behat/gherkin v4.5.1 Gherkin DSL parser for PHP 5.3
behat/mink v1.7.1 Browser controller/emulator abstraction for PHP
behat/mink-browserkit-driver v1.3.2 Symfony2 BrowserKit driver for Mink framework
behat/mink-extension v2.2 Mink extension for Behat
behat/mink-selenium2-driver v1.3.1 Selenium2 (WebDriver) driver for Mink framework
behat/symfony2-extension 2.1.1 Symfony2 framework extension for Behat |
Perhaps it's related to some non-BC changes in mink, like #92. |
My project works on Vagrant with Docker Engine. I have the follow configurations in behat:
When I run behat it fails and throws me the error: Fatal error: Call to a member function open() on null (Behat\Testwork\Call\Exception\FatalThrowableError)
The text was updated successfully, but these errors were encountered: