forked from GNUsocial/gnu-social
[TOOLS][TESTS] Add a data fixture with example notes, for testing
This commit is contained in:
parent
fbe0f36a53
commit
de0c35d5a6
16
src/DataFixtures/NoteFixtures.php
Normal file
16
src/DataFixtures/NoteFixtures.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\DataFixtures;
|
||||
|
||||
use App\Entity\Note;
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
class NoteFixtures extends Fixture
|
||||
{
|
||||
public function load(ObjectManager $manager)
|
||||
{
|
||||
$manager->persist(Note::create(['gsactor_id' => 1, 'content' => 'some content']));
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user