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

rel #34944 : remove obsolete test, tags creation now handled by storm

parent 17a4208e
Branches
Tags
3 merge requests!1659Master,!1587Master,!1560Hotline#34944 tags notices disfonctionnement de l affichage
......@@ -109,49 +109,6 @@ class GlobalSqlRefactoringTest extends Storm_Test_ModelTestCase {
}
/** @test */
public function tagNoticeCreerTag() {
$this
->prepare("select id_tag from codif_tags where code_alpha='TEST'",
$this->statementMock()
->whenCalled('fetch')->with(Zend_Db::FETCH_NUM)->answers([5]))
->prepare('select facettes from notices where id_notice=3',
$this->statementMock()
->whenCalled('fetch')->with(Zend_Db::FETCH_NUM)->answers([' ZTEST']))
->prepare('select notices,a_moderer from codif_tags where id_tag=5',
$this->statementMock()
->whenCalled('fetch')->with(Zend_Db::FETCH_ASSOC)
->answers(['notices' => ';3;',
'a_moderer' => ';3;']))
;
$affected = new StdClass();
$affected->affected_rows = 1;
$this->mock_adapter
->whenCalled('query')
->with("update notices set facettes=' ZTEST Z5' where id_notice=3")
->answers(null)
->whenCalled('query')
->with("update codif_tags set notices=';3;', a_moderer=';3;' where id_tag=5")
->answers(null)
->whenCalled('getConnection')
->answers($affected);
(new Class_TagNotice())->creer_tag('test', 3);
$this->assertTrue($this->mock_adapter
->methodHasBeenCalledWithParams('query',
["update notices set facettes=' ZTEST Z5' where id_notice=3"]));
$this->assertTrue($this->mock_adapter
->methodHasBeenCalledWithParams('query',
["update codif_tags set notices=';3;', a_moderer=';3;' where id_tag=5"]));
}
protected function statementMock() {
return $this->mock()
->whenCalled('execute')->answers(null)
......
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