Behat Problem

Hi there,

once I managed to install and configure Behat/Mink and the corresponding Yii extension, and after short period of joy, I am in trouble with quite enexpected behaviour of Behat that I described at stackoverflow and which I describe here.

I have a scenario


Scenario: editing journal

    Given the following journals are present:

        | name          | link                      | description           |

        | Gazzetta      | http://www.gazzetta.com   | sport news            | 

        | Murzilka      | www.murz.com              | advanced child journal|

        Given I am on edit page for journal "Gazzetta"

        Then I should see "Update Gazzetta"

        And I should see "sport news"

        And I should see "http://www.gazzetta.com"

The output of behat is this one:


 Scenario: editing journal

       # features\journal.feature:35


    Given the following journals are present:

       # FeatureContext::theFollowingJournalsArePresent()

      | name     | link                    | description            |

      | Gazzetta | http://www.gazzetta.com | sport news             |

      | Murzilka | www.murz.com            | advanced child journal |

    Given I am on edit page for journal "Gazzetta"

       # FeatureContext::iAmOnEditPageForJournal()

    Then I should see "Update Gazzetta"

       # FeatureContext::assertPageContainsText()

    And I should see "sport news"

       # FeatureContext::assertPageContainsText()

    And I should see "http://www.gazzetta.com"

       # FeatureContext::assertPageContainsText()

      The text "http://www.gazzetta.com" was not found anywhere in the text of the current page.

The strange thing is that when I see the corresponding page in browser (I am quite sure that this is namely that page that is used when I run the tests) I see all the phrases: "Update Gazzetta", "sport news" and "http://www.gazzetta.com".

Do you have any idea what it might be?

have you resolved ?

If don’t try using ‘Then print last response’ and check in the raw html output if the string is really here.

Thanks a lot for the suggestion, I’ve not knew this command before though I was looking for it. It’s sort of analog of “Then show me the page” in Cucumber.

Concerning the problem I’ve found a way out by making use of the following predefined step:


Then the "field_id" field should contain "text"

It’s not so concise but it works.

Can I know to connect Yii framework with Behat @veontomo?