setPoints example

$struct = new Vote();

        if (isset($data['__vote_id'])) {
            $struct->setId((int) $data['__vote_id']);
        }

        if (isset($data['__vote_name'])) {
            $struct->setName($data['__vote_name']);
        }

        if (isset($data['__vote_points'])) {
            $struct->setPoints((float) $data['__vote_points']);
        }

        if (isset($data['__vote_comment'])) {
            $struct->setComment($data['__vote_comment']);
        }

        if (isset($data['__vote_datum']) && $data['__vote_datum'] != '0000-00-00 00:00:00') {
            $struct->setCreatedAt(
                new DateTime($data['__vote_datum'])
            );
        }

        
static::assertEquals($percent$element->getPercent());
    }

    /** * test point getter and setter * * @group reviews */
    public function testPointsGetterSetter(): void
    {
        $expected = 2;
        $this->element->setPoints($expected);

        static::assertEquals($expected$this->element->getPoints());
    }

    /** * test count getter and setter * * @group reviews */
    public function testCountGetterSetter(): void
    {
        
/** @var Shop $shop */
        $shop = $this->getModelManager()->getReference(Shop::class$this->get('shop')->getId());

        $blogCommentModel->setBlog($blog);
        $blogCommentModel->setCreationDate(new DateTime());
        $blogCommentModel->setActive(false);

        $blogCommentModel->setName($commentData['name']);
        $blogCommentModel->setEmail($commentData['eMail']);
        $blogCommentModel->setHeadline($commentData['headline']);
        $blogCommentModel->setComment($commentData['comment']);
        $blogCommentModel->setPoints($commentData['points']);
        $blogCommentModel->setShop($shop);

        $this->get('models')->persist($blogCommentModel);
        $this->get('models')->flush();
    }

    /** * Returns all data needed to display the pager * * @param int $totalResult * @param int $limitEnd * @param int $page * @param int $categoryId * * @return array */
Home | Imprint | This part of the site doesn't use cookies.