mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
tests: Remove @expectException
annotation.
This commit is contained in:
@@ -11,8 +11,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Test\Search;
|
||||
|
||||
use Chill\MainBundle\Search\ParsingException;
|
||||
use Chill\MainBundle\Search\SearchInterface;
|
||||
use Chill\MainBundle\Search\SearchProvider;
|
||||
use Chill\MainBundle\Search\UnknowSearchDomainException;
|
||||
use Chill\MainBundle\Search\UnknowSearchNameException;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
@@ -100,20 +103,18 @@ final class SearchProviderTest extends TestCase
|
||||
], $terms);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Chill\MainBundle\Search\UnknowSearchNameException
|
||||
*/
|
||||
public function testInvalidSearchName()
|
||||
{
|
||||
$this->expectException(UnknowSearchNameException::class);
|
||||
|
||||
$this->search->getByName('invalid name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Chill\MainBundle\Search\ParsingException
|
||||
*/
|
||||
public function testMultipleDomainError()
|
||||
{
|
||||
$term = $this->p('@person @report');
|
||||
$this->expectException(ParsingException::class);
|
||||
|
||||
$this->p('@person @report');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,14 +147,11 @@ final class SearchProviderTest extends TestCase
|
||||
], $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Chill\MainBundle\Search\UnknowSearchDomainException
|
||||
*/
|
||||
public function testSearchResultDomainUnknow()
|
||||
{
|
||||
$response = $this->search->getSearchResults('@unknow domain');
|
||||
$this->expectException(UnknowSearchDomainException::class);
|
||||
|
||||
//$this->markTestSkipped();
|
||||
$this->search->getSearchResults('@unknow domain');
|
||||
}
|
||||
|
||||
public function testSearchWithinSpecificSearchName()
|
||||
@@ -169,12 +167,11 @@ final class SearchProviderTest extends TestCase
|
||||
$this->assertEquals('I am domain foo', $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Chill\MainBundle\Search\ParsingException
|
||||
*/
|
||||
public function testSearchWithinSpecificSearchNameInConflictWithSupport()
|
||||
{
|
||||
$response = $this->search->getResultByName('@foo default search', 'bar');
|
||||
$this->expectException(ParsingException::class);
|
||||
|
||||
$this->search->getResultByName('@foo default search', 'bar');
|
||||
}
|
||||
|
||||
public function testSimplePattern()
|
||||
|
@@ -55,11 +55,10 @@ final class TokenManagerTest extends KernelTestCase
|
||||
$this->assertEquals($user->getUsernameCanonical(), $tokens['u']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \UnexpectedValueException
|
||||
*/
|
||||
public function testGenerateEmptyUsernameCanonical()
|
||||
{
|
||||
$this->expectException(\UnexpectedValueException::class);
|
||||
|
||||
$tokenManager = $this->tokenManager;
|
||||
// set a username, but not a username canonical
|
||||
$user = (new User())->setUsername('test');
|
||||
|
Reference in New Issue
Block a user