tests/unit/Subjects/AbstractSubjectTest.php
/**
     * Test the getRootCategory() method throwing an exception.
     *
     * @return void
     */
Test the getRootCategory() method throwing an exception.
@return void
Test the getRootCategory () method throwing an exception . @return void
public function testGetRootCategoryWithException()
    {
        $this->expectException(\Exception::class);
        $this->expectExceptionMessage("Root category for unknown is not available");
        $this->abstractSubject->setStoreViewCode('unknown');
        $this->abstractSubject->getRootCategory();
    }
public function testGetRootCategoryWithException ( ) { $ this -> expectException ( \ Exception :: class ) ; $ this -> expectExceptionMessage ( " Root category for unknown is not available " ) ; $ this -> abstractSubject -> setStoreViewCode ( 'unknown' ) ; $ this -> abstractSubject -> getRootCategory ( ) ; }
Test the getRootCategory() method throwing an exception.
Test the getRootCategory () method throwing an exception .