Blog posts tagged with behat
Mocking Symfony Container services in Behat scenarios with Mockery
Mocking objects in unit tests is pretty straight forward as every object used in a test case is usually created in a scope of one test class. In functional tests it's a bit harder since we either don't have full control over objects being created or it's simply too laborious to mock half the framework. Instead of functional tests I'm using Behat. In the context of this blog post it satisfies the same need - verifies the external behavior of an application.
Fixing failing Behat scenarios in large suites
In projects I currently work on I'm taking the BDD approach really seriously. In one of my Symfony2 projects I ended up with quite a lot of Behat features and scenarios which one day started failing on the integration server. The problem was in MySQL returning "too many connections" response.


















