public function test_add_block_double_switch() { $block_name = 'abc'; $switch_expected = true; $this->language->expects($this->at(0))->method('lang')->with($block_name)->willReturn(strtoupper($block_name)); $this->template->expects($this->at(0))->method('assign_block_vars')->with('faq_block', array('BLOCK_TITLE' => strtoupper($block_name), 'SWITCH_COLUMN' => $switch_expected)); $this->manager->add_block($block_name, true); $this->assertTrue($this->manager->switched_column()); // Add a second block with switch $block_name = 'def'; $switch_expected = false; $this->language->expects($this->at(0))->method('lang')->with($block_name)->willReturn(strtoupper($block_name)); $this->template->expects($this->at(0))->method('assign_block_vars')->with('faq_block', array('BLOCK_TITLE' => strtoupper($block_name), 'SWITCH_COLUMN' => $switch_expected)); $this->manager->add_block($block_name, true); $this->assertTrue($this->manager->switched_column()); }