theofidry / alicebundleextension Goto Github PK
View Code? Open in Web Editor NEWBehat extension for HautelookAliceBundle.
License: MIT License
Behat extension for HautelookAliceBundle.
License: MIT License
It looks like you can do this:
Given the following fixtures files are loaded:
| parameters.yml |
| dummies_1.yml |
| dummies_2.yml |
Having:
parameters:
param1: 'param 1 value'
param2: 'param 2 value'
Two tiny issues here:
As seen here, the fabpot/php-cs-fixer
package is not maintained anymore.
Hello !
When I load my fixtures though the command line, it works well.
But when I load my fixtures from the fixtures with AliceBundleExtension, I have an error :
# Fidry\AliceBundleExtension\Context\Doctrine\AliceORMContext::thereAreFixtures()
An exception occurred while executing 'INSERT INTO profile (first_name, last_name, birth_date, city, stable, gender, geoloc, deleted_at, created_at, updated_at, discipline_id, level_id, user_id, contact_id, preference_id, notification_id) VALUES (?, ?, ?, ?, ?, ?, PointFromText(?), ?, ?, ?, ?, ?, ?, ?, ?, ?)':
SQLSTATE[HY000]: General error: 1 no such function: PointFromText (Doctrine\DBAL\Exception\DriverException)
My doctrine function "PointFromText" should work. Maybe it's because fixtures are loaded through test environment, but could not figure out the solution.
Any clue ?
I am using blameable extension on some entities.
When I am loading my fixtures, it seems that there is no current user used for insertion. Until now, I forced the createdBy field manually for a dirty workaround. But today, one of my entities triggers another insertion on which I have no control over.
I am wondering if I can set a user when I am loading the fixtures.
Hi, I am getting this error when doing composer require:
Problem 1
- Installation request for theofidry/alice-fixtures-extension ^0.1.0 -> satisfiable by theofidry/alice-fixtures-extension[v0.1].
- theofidry/alice-fixtures-extension v0.1 requires hautelook/alice-bundle dev-master -> no matching package found.
Can you please check? I don't think it is recommended to rely on dev-master. What do you think? Could be possible to use 0.2?
Any plan to have AliceBundleExtension compatible with hautelook/AliceBundle 2.0 ?
Not a bug but a question. How to clean the test db before running behat test with fixtures ? Fixtures loaded are still in db after the ending of tests, then if I re-run behat, I got duplicate insert db error.
Hello,
Is it possible to load custom class that contain custom function, because I have on it the getFixtures
function that load the .yml
files.
The class
<?php
namespace Tests\Functionals\Fixtures\Test;
use Hautelook\AliceBundle\Doctrine\DataFixtures\AbstractLoader;
class Users extends AbstractLoader implements OrderedFixtureInterface
{
public function fooFunction()
{
return new Bar();
}
/**
* {@inheritDoc}
*/
public function getFixtures()
{
return [
__DIR__ . '/users.yml'
];
}
/**
* Get the order of this fixture
*
* @return integer
*/
public function getOrder()
{
return 1;
}
}
And the users.yml
AcmeBundle\Entity\User:
username: foo
lastname: bar
bar: <fooFunction()>
The main idea is to stay same logic with HautelookAliceBundle:
Something like this :
Background: Re-init the database and load the fixtures
Given the fixtures "\Tests\Functionals\Fixtures\Test\Users" are loaded
Or with the PHP file on fixture path:
Background: Re-init the database and load the fixtures
Given the fixtures "Users" are loaded
Which load the yml through getFixtures
, really the same that HautelookAliceBundle logic.
Do you think it is possible ?
AliceBundleExtension/src/Extension.php
Line 71 in 6b1aa9e
Lifetime could be useful. Can you provide a documentation about it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.