forked from GNUsocial/gnu-social
[TOOLS][TESTS] Add a data fixture with example notes, for testing
This commit is contained in:
parent
b79c0595d5
commit
f25494cd83
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