Skip to content
Snippets Groups Projects
Commit c163132d authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

rel #21758: fix tests failure

parent cfd378cf
Branches
Tags
3 merge requests!896Master,!830Dev#21758 json search results,!823Dev#21758 json search results
......@@ -362,11 +362,9 @@ class CriteresRechercheSerieTest extends AbstractControllerTestCase {
/** @test */
public function visitCatalogueShouldNotBeCalled() {
$visitor = Storm_Test_ObjectWrapper::mock()
$visitor = Storm_Test_ObjectWrapper::on(new TestingSearchCriteriaVisitor())
->whenCalled('visitCatalogue')->never()
->whenCalled('visitSerie')->answers(true)
->whenCalled('hasErreur')->answers(false);
->getWrapper();
$this->criteres_recherche->acceptVisitor($visitor);
}
......@@ -394,17 +392,15 @@ class CriteresRechercheWithGenreTest extends AbstractControllerTestCase {
/** @test */
public function visitFiltresShouldBeCalledWithG10AndG56() {
$visitor = Storm_Test_ObjectWrapper::mock()
->whenCalled('visitFiltre')->answers(true)
->whenCalled('hasErreur')->answers(false)
->whenCalled('visitTri')->answers(true)
->whenCalled('visitNumericOnly')->answers(true);
$visitor = Storm_Test_ObjectWrapper::on(new TestingSearchCriteriaVisitor());
$this->criteres_recherche->acceptVisitor($visitor);
$this->assertEquals(['G10','G56'], $visitor->getFirstAttributeForLastCallOn('visitFiltre'));
$this->assertEquals(['G10','G56'],
$visitor->getFirstAttributeForLastCallOn('visitFiltre'));
}
}
}
?>
\ No newline at end of file
class TestingSearchCriteriaVisitor {
use Trait_SearchCriteriaVisitor;
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment