/**
  * Test pre set data
  *
  * @param StatusInterface $status
  * @param bool            $isGranted
  * @param array           $expected
  *
  * @dataProvider provideStatus
  */
 public function testPreSetData($status, $isGranted, array $expected)
 {
     Phake::when($this->authorizeStatusChangeManager)->isGranted(Phake::anyParameters())->thenReturn($isGranted);
     Phake::when($this->object)->getId()->thenReturn('fakeId');
     Phake::when($this->object)->getStatus()->thenReturn($status);
     $this->subscriber->preSetData($this->event);
     Phake::verify($this->form)->add('status', 'oo_status_choice', array('embedded' => true, 'label' => 'open_orchestra_backoffice.form.node.status', 'group_id' => 'properties', 'sub_group_id' => 'publication', 'choices' => $expected));
 }
 /**
  * @param bool $hasDefaultThemeSite
  * @param int  $callTimes
  *
  * @dataProvider provideHasDefaultThemeSite
  */
 public function testPreSetData($hasDefaultThemeSite, $callTimes)
 {
     Phake::when($this->object)->hasDefaultSiteTheme()->thenReturn($hasDefaultThemeSite);
     $this->subscriber->preSetData($this->event);
     Phake::verify($this->object, Phake::times($callTimes))->setTheme(NodeInterface::THEME_DEFAULT);
 }