Yii Framework Forum: Behat And Mink Installation In Win 7 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Behat And Mink Installation In Win 7 Rate Topic: -----

#1 User is offline   veontomo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 19-October 12

Posted 28 February 2013 - 06:03 AM

Hello to everybody,
it's fourth day that I've been struggling with installing behat and mink extension. But so far I have not succeeded. I'm asking myself if it is possible at all?
I tried PHAR installation, then COMPOSER. With no success.

My setup is:
  • OS: Windows 7 Professional 64 bit
  • Apache server 2.2.14 (win32)
  • PHP 5.4.9


The point is that behat and mink are apparently being installed fine, but:
  • the first suspicion that comes in mind is the absence of predefined steps available in behat (no matter whether I initialize behat with
    behat --init

    or not).
  • as a consequence, whatever command I use in FeatureContext.php, for example

       public function iAmOnTheHomepage()
        {
            $this->visit('/');
        }
    

    I get
    php.exe : PHP Fatal error:  Call to undefined method FeatureContext::visit() in 
    xxx\protected\tests\features\bootstrap\FeatureContext.php on line 63
    



It seems that behat does not find mink extension, but I can not find out how to force it to do this.
The more one gets to know of Yii, the more one values Yii.
0

#2 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 28 February 2013 - 09:08 AM

/* moved from Feature Requests */

You'll probably have better luck getting help on the Behat/Mink homepage.
"Less noise - more signal"
0

#3 User is offline   veontomo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 19-October 12

Posted 28 February 2013 - 09:16 AM

View Postjacmoe, on 28 February 2013 - 09:08 AM, said:

/* moved from Feature Requests */

You'll probably have better luck getting help on the Behat/Mink homepage.

you are absolutely right... probably, it's better to remove the topic.
The more one gets to know of Yii, the more one values Yii.
0

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 28 February 2013 - 09:46 AM

Not necessarily. Because there might be some Yii users who use it and knows how to install it. So let's just let it be, and hope that you get some help soon. ;)
"Less noise - more signal"
0

#5 User is offline   veontomo 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 26
  • Joined: 19-October 12

Posted 03 September 2013 - 03:49 PM

Half a year later I came across my own post :-). The solution to the problem is to add the following lines to the features/bootstrap/FeatureContext.php file:

use Behat\MinkExtension\Context\MinkDictionary;
class FeatureContext extends BehatContext
{

    use MinkDictionary;
.....
}


Probably it might be useful for somebody.
The more one gets to know of Yii, the more one values Yii.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users