Questions tagged [alice-fixtures]

35 questions
1
vote
3 answers

how to set roles datafixtures in hautelook alicebundle?

I'm having a hard time to fix this problem by adding roles in datafixtures using hautelook bundle. I create a provider that will add a roles to the fixtures
user3818576
  • 2,979
  • 8
  • 37
  • 62
1
vote
2 answers

nelmio/alice random string with specified long

I was trying to find way generate random unique string with 8 characters long using nelmio/alice. And I've found only (token (unique): )method, unfortunately it returns too long string, I need just 8 characters. May be some one…
1
vote
1 answer

Nelmio/Alice 2.x Symfony 3 , Loading Related Fixtures in Different Bundles

If there's already answer to my question then sorry and please point me in the right direction because I can't find anything. Let's say I have two Bundles. Each bundle has fixures.yml file and loader file. Loaders and fixtures are working fine when…
Robert
  • 1,206
  • 1
  • 17
  • 33
1
vote
1 answer

Create sane start and end dates with nelmio\alice

I want to create a completedDatetime that follows the datetime in the orderDatetime field. Fixtures.yml directive_{200..500}: orderDatetime: completedDatetime: '90%? ' I used the…
Bill.Caffery
  • 465
  • 1
  • 5
  • 21
1
vote
1 answer

Hautleook/AliceBundle fixture yml configuration with randomElement faker function

I am trying to configure the yml file for Hauleook/AliceBundle fixture. Project\MainBundle\Entity\Manager: manager_{1..30}: name: ' ' profile_image: '9.jpg' profile_image_thumb:…
Ralph
  • 2,065
  • 3
  • 15
  • 23
1
vote
1 answer

Alice Bundle : dynamic entity loop parameter

I use Hautelook AliceBundle which use Faker to generate fixtures with real world data. In Alice, we can use parameters in our YAML file like below: parameters: pwd_parameter: anything My\UserEntity: #generate 10 users with password equals to…
goto
  • 7,908
  • 10
  • 48
  • 58
1
vote
1 answer

How to set the same value for more than one field using Alice and Doctrine Fixtures?

AppBundle\Entity\UserAccount: UserAccount_{1..5}: emailConfirmed: '80%? 1 : 0' enabled: ???? How to set enabled field to hold the same value as emailConfirmed field. In other words - how to reference other field value in the…
1
vote
0 answers

Symfony Circular Reference Exception with Doctrine tree extension

I have a Circular Reference Exception because of Doctrine Tree Extension when I'm tring to load my fixture with Alice fixture. [Doctrine\Common\DataFixtures\Exception\CircularReferenceException] Graph contains cyclic dependency. An example of…
Kevin
  • 4,823
  • 6
  • 36
  • 70
1
vote
1 answer

Symfony3 Doctrine Hautelook/Alice cannot load fixtures

Im using Symfony3 in my Project along with Doctrine ORM. Now i wanted to have some nice fixtures with Hautelook/AliceBundle. So i was installing the bundle, registering it to the AppKernel as well as making an entry in the config. I added a…
maddes.h
  • 96
  • 5
1
vote
1 answer

Two way relationships with Alice Bundle Fixtures

I am trying to create test data using the Alice Bundle fixtures in my Symfony2 project. So far I've been pretty successful. But now I am trying to create fixtures from two entities that depend on each other. Here is my fixture definition for the…
kc_rob
  • 147
  • 1
  • 9
1
vote
0 answers

How to retrieve existing object from Database in Nelmio/Alice

I'm trying to retrieve an entity that is already in my test database with a fixed id. I am defining it like this: AppBundle\Entity\Template: template: name: I am a new template owner: 1 And I have the setOwner typehinted per the…
0
votes
0 answers

File fixture with Alice

Is there a way to have a fixture with a file, with hautelook/alice-bundle ? I'm trying to do : App\Entity\MediaObject: media_object_1: file: '' But this is not working, because the file…
Xero
  • 3,951
  • 4
  • 41
  • 73
0
votes
1 answer

Symfony Panther fails with alice bundle active

I have a weird problem. In my Symfony project I use a Postgresql database. If I run my panther tests all things went well. Now I have installed this bundle hautelook/alice-bundle. As soon as I activate the ReloadDatabaseTrait in a panther test this…
0
votes
0 answers

PUT request doesn't update nested collection into a test. Works when another request is executed before

PUT request won't update nested collections when the sole test is executed. If I run all the test suite php bin/phpunit, it works. If I make the request via a HTTP client (Postman, cURL...), it works. But if I run this sole test only php…
tomsihap
  • 1,712
  • 18
  • 29
0
votes
1 answer

How to force insert Alice fixtures?

I'm getting the problem with references in Alice fixtures. I would like to insert the value, not the reference, coz later on i would like to insert this data in existing database. Account_User2: # Generated here account_id (unique): 1 …
Lalabuy
  • 65
  • 1
  • 9