HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: /virtual/nagasaki/public_html/ec/tests/Eccube/Tests/Repository/HelpRepositoryTest.php
<?php

namespace Eccube\Tests\Repository;

use Eccube\Tests\EccubeTestCase;
use Eccube\Application;
use Eccube\Entity\Help;

/**
 * HelpRepository test cases.
 *
 * @author Kentaro Ohkouchi
 */
class HelpRepositoryTest extends EccubeTestCase
{

    public function testGet()
    {
        $Help = $this->app['eccube.repository.help']->get();

        $this->expected = 1;
        $this->actual = $Help->getId();
        $this->verify();
    }

    public function testGetWithId()
    {
        $Help = $this->app['eccube.repository.help']->get(1);

        $this->expected = 1;
        $this->actual = $Help->getId();
        $this->verify();

        // MySQL では成功するが, PostgreSQL ではエラーになってしまう
        // $Help = $this->app['eccube.repository.help']->get('a');
        // $this->assertNull($Help);

        $Help = $this->app['eccube.repository.help']->get(5);
        $this->assertNull($Help);
    }
}