get(CLpRepository::class); $course = $this->createCourse('new'); $teacher = $this->createUser('teacher'); $lp = (new CLp()) ->setName('lp') ->setParent($course) ->setCreator($teacher) ->setLpType(CLp::LP_TYPE) ; $this->assertHasNoEntityViolations($lp); $repo->createLp($lp); $this->assertNotNull($lp->getResourceNode()); $this->assertSame(1, $lp->getItems()->count()); $this->assertSame('lp', (string) $lp); $this->assertSame(1, $repo->count([])); } }