コード例 #1
0
 /**
  * @param \Smirik\PropelAdminBundle\spec\Smirik\PropelAdminBundle\Stub\ItemStub $item_stub
  */
 function it_should_return_correct_icon_name($item_stub)
 {
     $item_stub->getTest()->willReturn('image1.jpg');
     $this->getView($item_stub)->shouldBe('jpg');
     $item_stub->getTest()->willReturn('image1.pdf');
     $this->getView($item_stub)->shouldBe('pdf');
     $item_stub->getTest()->willReturn('image1.omg');
     $this->getView($item_stub)->shouldBe('file');
 }
コード例 #2
0
 /**
  * @param \Smirik\PropelAdminBundle\spec\Smirik\PropelAdminBundle\Stub\ItemStub $item_stub
  */
 function it_should_return_correct_button_text($item_stub)
 {
     $this->setup($this->getOptions());
     $item_stub->getTest()->willReturn(0);
     $this->getView($item_stub)->shouldBe('Unapproved');
     $item_stub->getTest()->willReturn(1);
     $this->getView($item_stub)->shouldBe('Approved');
     $item_stub->getTest()->willReturn(-1);
     $this->getView($item_stub)->shouldBe('Rejected');
 }
コード例 #3
0
 /**
  * @param \Smirik\PropelAdminBundle\spec\Smirik\PropelAdminBundle\Stub\ItemStub $item_stub
  */
 function it_should_have_correct_value($item_stub)
 {
     $item_stub->getTest()->willReturn('OK');
     $this->getGetter()->shouldBe('Test');
     $this->getValue($item_stub)->shouldBe('OK');
 }