liipfunctionaltestbundle

Functional test: sqlite does not include soundex()

亡梦爱人 提交于 2020-01-15 11:58:08
问题 Attempts to build a functional test where soundex() is required fail due to the fact that the function by default is not compiled in pdo_sqlite. Functional tests are being built using LiipFunctionalTestBundle. The error reported is: PDOException: SQLSTATE[HY000]: General error: 1 no such function: Soundex and the SQLite documentation says: The soundex(X) function ... is omitted from SQLite by default I've tried (from php docs) $db->sqliteCreateFunction('soundex', 'sqlite_soundex', 1); where

Symfony2 LiipFunctionalTestBundle overriding @validator service

拜拜、爱过 提交于 2019-12-12 11:13:46
问题 I am trying to inject @validator into my service but LiipFunctionalTestBundle is overriding that service when it gets injected. admin.image_service: class: AdminBundle\Service\ImageService arguments: ["@validator", "@doctrine.orm.admin_entity_manager", "@image_storage_filesystem"] Which results in the error must be an instance of Symfony\Component\Validator\Validator\RecursiveValidator, instance of Liip\FunctionalTestBundle\Validator\DataCollectingValidator given running php bin/console debug

Independent functional tests with LiipFunctionalTestBundle and fixtures?

萝らか妹 提交于 2019-12-06 08:25:50
问题 I'm adding tests to a Symfony2 project. Previously I used the same database for dev and test environments, it used a MySQL database already populated with the same data than on the production server. The tests were working dependently because some tests depended on previous tests. For example if I had a shop website, I added a product in the cart then removed the product from the cart. So I needed to insert data by using a form, before being able to remove it. Now I want to work with

Testing database insert using Symfony

一世执手 提交于 2019-12-04 13:27:44
问题 Good day everyone, I have been looking into Test Driven Development a lot in the past few days and decided that I need to learn it as well. Although I can not figure out how to do it precisely. My project depends on the Symfony2.1.6 framework and Doctrine so I have some Database-tables that needs filling. Book (1,n) - (0,n) Genre Now if I want to insert a Genre-record I first need to write a test to ensure everything is being inserted as it should (or am I wrong?) The problem now is that I

Testing database insert using Symfony

不羁的心 提交于 2019-12-03 09:13:08
Good day everyone, I have been looking into Test Driven Development a lot in the past few days and decided that I need to learn it as well. Although I can not figure out how to do it precisely. My project depends on the Symfony2.1.6 framework and Doctrine so I have some Database-tables that needs filling. Book (1,n) - (0,n) Genre Now if I want to insert a Genre-record I first need to write a test to ensure everything is being inserted as it should (or am I wrong?) The problem now is that I dont know how to access my Database as it is managed by the framework. The only thing I could find was