Eccube\Tests\Repository\CategoryRepositoryTest::testSaveWithException PHP Method

testSaveWithException() public method

    public function testSaveWithException()
    {
        $faker = $this->getFaker();
        $name = $faker->name;
        $Category = new Category();
        $Category->setName($name)->setLevel(null);
        // level は not null なので例外になる
        $result = $this->app['eccube.repository.category']->save($Category);
        $this->assertFalse($result);
    }